MathUtils class Null safety

Utility methods for mathematical operations.

Constructors

MathUtils()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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<double>> matrix) List<double>
Multiplies a 1x3 row vector with a 3x3 matrix.
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.