Math methods

Method Description
Math.max(a,b) Maximum of a and b
Math.min(a,b) Minimum of a and b
Math.abs(a) Absolute value a
Math.sqrt(a) Square-root of a
Math.pow(a,b) Power of b
Math.round(a) Closest integer
Math.sin(ang) Sine of ang
Math.cos(ang) Cosine of ang
Math.tan(ang) Tangent of ang
Math.asin(ang) Inverse sine of ang
Math.log(a) Natural logarithm of a
Math.toDegrees(rad) Angle rad in degrees
Math.toRadians(deg) Angle deg in radians
Comments