MathUtils class abstract final

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

constrain(double val, double min, double max) → double
damp(double current, double target, double lambda, double deltaTime) → double
flipCoin() → bool
flipCoinWith(double prob) → bool
inverseLerp(double a, double b, double v) → double
lcm(int a, int b) → int
lerp(double a, double b, double t) → double
lerpAngle(double from, double to, double t) → double
moveTowards(double current, double target, double maxDelta) → double
normalizeAngle(double a) → double
randDouble(double min, double max) → double
randInt(int min, int max) → int
randPick<T>(List<T> arr) → T
randTake<T>(List<T> arr) → T
randWeightedPick<T>(List<T> arr, List<double> weights) → T
randWeightedTake<T>(List<T> arr, List<double> weights) → T
remap(double v, double a, double b, double c, double d, {ParametricFunc paramteric = Parametrics.linear}) → double
seedRandom(int seed) → void
shuffle<T>(List<T> arr) → void