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)
degreenumber
Degree to radius.
Editor.Math.rad2deg (radius)
radiusnumber
Radius to degree.
Editor.Math.rad180 (radius)
radiusnumber
Let radius in -pi to pi.
Editor.Math.rad360 (radius)
radiusnumber
Let radius in 0 to 2pi.
Editor.Math.deg180 (degree)
degreenumber
Let degree in -180 to 180.
Editor.Math.deg360 (degree)
degreenumber
Let degree in 0 to 360.
Editor.Math.randomRange (min, max)
minnumbermaxnumber
Returns a random floating-point number between min (inclusive) and max (exclusive).
Editor.Math.randomRangeInt (min, max)
minnumbermaxnumber
Returns a random integer between min (inclusive) and max (exclusive).
Editor.Math.clamp (val, min, max)
valnumberminnumbermaxnumber
Clamps a value between a minimum float and maximum float value.
Editor.Math.clamp01 (val)
valnumber
Clamps a value between 0 and 1.
Editor.Math.calculateMaxRect (out, p0, p1, p2, p3)
outrectp0vec2p1vec2p2vec2p3vec2
Editor.Math.lerp (from, to, ratio)
fromnumbertonumberrationumber
Editor.Math.numOfDecimals (val)
valnumber
Get number of decimals for decimal part.
Editor.Math.numOfDecimalsF (val)
valnumber
Get number of decimals for fractional part.
Editor.Math.toPrecision (val, precision)
valnumberprecisionnumber
Editor.Math.bezier (c0, c1, c2, c3, t)
c0numberc1numberc2numberc3numbertnumber
Editor.Math.solveCubicBezier (c0, c1, c2, c3, x)
c0numberc1numberc2numberc3numberxnumber