Constructor

	MathParser(void)
	Generates an instance of MathParser.


Methods

	MathParser.parse(expression: String): Number
	
		Parses a set of pre-defined commands to make a mathematical expression.
		
			expression mathematical expression that will be parsed
		
	


	MathParser.add(name: String, handler: Function(args): Number): void
	
		Adds a customized function to the parser.
		
			name name that should be used in the expression to call the user function
			handler function that will receive the arguments, it must return a number
		
	



Basic operations

	
		
			( and ) Precedence operator
		
	
	
		
			+ Addition
		
	
	
		
			- Subtraction
		
	
	
		
			* Multiplication
		
	
	
		
			/ Division
		
	
	
		
			^ Power
		
	
	
		
			~ Square Root
		
	
	
		
			% Division Reminder
		
	


Functions
The class has access to all functions defined in the Math object.

	
		
			abs Returns the absolute value of a number
		
	
	
		
			acos Returns the arccosine of a number
		
	
	
		
			asin Returns the arcsine of a number
		
	
	
		
			atan Returns the arctangent of a number
		
	
	
		
			ceil Returns the smallest integer greater than or equal to its numeric argument
		
	
	
		
			cos Returns the cosine of a number
		
	
	
		
			exp Returns e (the base of natural logarithms) raised to a power
		
	
	
		
			floor Returns the greatest integer less than or equal to its numeric argument
		
	
	
		
			log Returns the natural logarithm of a number
		
	
	
		
			round Returns a supplied numeric expression rounded to the nearest integer
		
	
	
		
			sin Returns the sine of a number
		
	
	
		
			tan Returns the tangent of a number
		
	
