MathUtils class

Helper class for common math operations.




hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() → String
Returns a string representation of this object.


operator ==(dynamic other) → bool
The equality operator.

Static Methods

calculateCircleDiameter(double radius) → double
Calculate the diameter of a circle with the given radius.
calculateCircularArea(double radius) → double
Calculate the area of a circle with the given radius.
calculateCircumference(double radius) → double
Calculate the circumference of a circle with the given radius.
calculateMixingTemperature(double mA, { double tA, { double mB, { double tB, { double cA double cB }) → double
Calculates the mixing temperature for substance A represented with mA, tA, cA and substance B represented with mB, tB, cB. [...]
calculateSquareArea(double a, { double b }) → double
Calculate the area of a square or rectangle with length a and/or lengthb.
convertUnit(double value, LengthUnits sourceUnit LengthUnits targetUnit) → double
Converts the given value from the sourceUnit to the targetUnit. Returns null if converting is not possible.
mean(List<num> l) → num
Calculates the arithmetic average of the given list of numbers.
round(double value, int decimals) → double
Rounds the give double value to the given decimals.