MathTools

Static variables

@:value(Math.PI / 180)staticDEG2RAD:Float = Math.PI / 180

@:value(2147483647)staticinlineread onlyMAX_INT:Int = 2147483647

The largest representable 32-bit signed integer, which is 2,147,483,647

@:value(MAX_INT * 2 + 1)staticinlineread onlyMAX_UINT:UInt = MAX_INT * 2 + 1

The largest representable 32-bit unsigned integer, which is 4,294,967,295

@:value(-2147483648)staticinlineread onlyMIN_INT:Int = -2147483648

The smallest representable 32-bit signed integer, which is -2,147,483,648

@:value(180 / Math.PI)staticRAD2DEG:Float = 180 / Math.PI

Static methods

@:value({ range : 1 })@:externstaticinlineapproximately(a:Float, b:Float, range:Float = 1):Bool

staticarithmeticMean(a:Iterable<Float>):Float

staticarraySum<T>(a:Iterable<T>):T

staticinlinecabs(v:Int):Int

staticclipSmooth(n:Int, count:Int):Map<Int, Int>

staticclipSmoothFrames(a:Int, count:Int):Array<Int>

staticclipSmoothOdd(n:Int, count:Int):Map<Int, Int>

staticclipSmoothOddPlan(n:Int, count:Int):Array<Int>

staticclipSmoothOddPlanSimple(n:Int, count:Int):Array<Int>

staticclipSmoothOddSimple(n:Int, count:Int):Map<Int, Int>

staticinlinecmax(a:Int, b:Int):Int

staticinlinecmin(a:Int, b:Int):Int

@:externstaticinlinecultureAdd(a:Float, b:Float, max:Float):Float

@:externstaticinlinecultureSub(a:Float, b:Float, min:Float):Float

@:externstaticinlinecultureTarget(a:Float, b:Float, step:Float):Float

staticinlinefloat10(v:Float):Float

staticinlinefloat100(v:Float):Float

staticinlinefloat1000(v:Float):Float

staticinlineformatPercent(v:Float):String

@:externstaticinlineinRange(v:Float, min:Float, max:Float):Bool

@:externstaticinlineintNot(v:Int):Int

@:externstaticinlineintTo(v:Float, count:Int):Float

staticinlinelengthAfterComma(v:Float):Int

staticinlinelengthBeforeComma(v:Float):Int

staticinlinelerp(start:Float, end:Float, t:Float):Float

@:externstaticinlinelimit(v:Float, min:Float, max:Float):Float

@:externstaticinlinemidValue(a:Float, b:Float, aCount:Float, bCount:Float):Float

staticinlinepcMinMax(a:SPair<Int>, b:SPair<Int>):SPair<Int>

@:externstaticinlinepercentBackCalc(p:Float, min:Float, max:Float):Float

@:externstaticinlinepercentCalc(p:Float, min:Float, max:Float):Float

@:externstaticinlinepercentCalcd(p:Float, a:Float, b:Float):Float

staticrange(a:Float, b:Float):Float

@:externstaticinlineroundTo(v:Float, count:Int):Float

staticshortValue(value:Int):String