Methods of the Math
object¶
Below is a list of the available methods provided by the Math
object. Click on a method name to see its detailed description and examples.
Method | Description |
---|---|
Math.deg() | Convert radians to degrees. |
Math.rad() | Convert degrees to radians. |
Math.fromPolar() | Convert coordinates of a point from polar coordinates (radius, angle) to Cartesian (x, y) . |
Math.normAngle() | Normalize the value of an angle, returns a value in the interval (0°, 360°). |
Math.spanAngle() | Distance between angles a₁ and a₂ . |
Math.middleAngle() | Calculate the average angle between a₁ and a₂ considering direction. |
Math.isEpsilon() | Returns true if the absolute value of arg ≤ eps . |
Math.isEqual() | Returns true if the difference between arg₁ and arg₂ ≤ eps . |
Math.isLessEqual() | Returns true if arg₁ ≤ arg₂ considering precision eps . |
Math.isGreatEqual() | Returns true if arg₁ ≥ arg₂ considering precision eps . |
Math.round() | Round a number to the specified precision. |