Editor.Math

Properties

Editor.Math.EPSILON

Editor.Math.MACHINE_EPSILON

Editor.Math.TWO_PI

Editor.Math.HALF_PI

Editor.Math.D2R

Editor.Math.R2D

Methods

Editor.Math.deg2rad (degree)

Degree to radius.

Editor.Math.rad2deg (radius)

Radius to degree.

Editor.Math.rad180 (radius)

Let radius in -pi to pi.

Editor.Math.rad360 (radius)

Let radius in 0 to 2pi.

Editor.Math.deg180 (degree)

Let degree in -180 to 180.

Editor.Math.deg360 (degree)

Let degree in 0 to 360.

Editor.Math.randomRange (min, max)

Returns a random floating-point number between min (inclusive) and max (exclusive).

Editor.Math.randomRangeInt (min, max)

Returns a random integer between min (inclusive) and max (exclusive).

Editor.Math.clamp (val, min, max)

Clamps a value between a minimum float and maximum float value.

Editor.Math.clamp01 (val)

Clamps a value between 0 and 1.

Editor.Math.calculateMaxRect (out, p0, p1, p2, p3)

Editor.Math.lerp (from, to, ratio)

Editor.Math.numOfDecimals (val)

Get number of decimals for decimal part.

Editor.Math.numOfDecimalsF (val)

Get number of decimals for fractional part.

Editor.Math.toPrecision (val, precision)

Editor.Math.bezier (c0, c1, c2, c3, t)

Editor.Math.solveCubicBezier (c0, c1, c2, c3, x)