## Math Functions    & Constants

Forms w/o the WWW
Drill w/o WWW
Sample
3. The perimeter, P(L, W) = 2(L) + 2(W), or the
area, A(L, W) = (L)(W), of a rectangle.

 Width: Lenght:

is

Code for the form
 ```
3. The perimeter, P(L, W) = 2(L) + 2(W), or the
area, A(L, W) = (L)(W), of a rectangle.

Width:
Lenght:

is

```
 Constants Math.E Base of the natural log, e. Math.LN10 Natural logarithm of 10. Math.LN2 Natural logarithm of 2. Math.LOG10E Log, base-10, of e. Math.LOG2E Log, base 2, of e. Math.PI Pi. Math.SQRT1_2 One divided by the square root of 2. Math.SQRT2 Square root of 2. Functions Math.abs( ) Absolute value. Math.sqrt( ) Square root. Math.pow(x,y) Compute x-to-the-y. Math.ceil() Round up. Math.floor( ) Round down. Math.max( ) Larger of two numbers. Math.min( ) Smaller of two numbers. Math.round( ) Round to the nearest integer. Math.random( ) Pseudo-random number. Math.exp( ) Compute an exponent of e. Math.log( ) Compute a natural logarithm of a positive number. pi/180 is about 0.017453293 Math.sin( ) Sine of a radian measure Math.cos( ) Cosine of a radian measure Math.tan( ) Tangent of a radian measure Math.asin( ) Arcsine -- returns a radian measure. Math.acos( ) Arccosine -- returns a radian measure. Math.atan( ) Arctangent -- returns a radian measure. Math.atan2(x,y) Compute the angle, in radians, from the X-axis to a point (x,y).