MathUtils class
Utility methods for mathematical operations.
Constructors
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
-
clampDouble(
double min, double max, double input) → double - Clamps an integer between two floating-point numbers.
-
clampInt(
int min, int max, int input) → int - Clamps an integer between two integers.
-
differenceDegrees(
double a, double b) → double - Distance of two points on a circle, represented using degrees.
-
lerp(
double start, double stop, double amount) → double - The linear interpolation function.
-
matrixMultiply(
List< double> row, List<List< matrix) → List<double> >double> - Multiplies a 1x3 row vector with a 3x3 matrix.
-
rotationDirection(
double from, double to) → double - Sign of direction change needed to travel from one angle to another.
-
sanitizeDegreesDouble(
double degrees) → double - Sanitizes a degree measure as a floating-point number.
-
sanitizeDegreesInt(
int degrees) → int - Sanitizes a degree measure as an integer.
-
signum(
double num) → int - The signum function.