MathUtils class
Utility functions that are used my both PolyUtil and SphericalUtil.
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 Properties
- earthRadius → num
-
The earth's radius, in meters.
Mean radius as defined by IUGG.
final
Static Methods
-
arcHav(
num x) → num - Computes inverse haversine. Has good numerical stability around 0.
-
clamp(
num x, num low, num high) → num -
Restrict x to the range
low, high
. -
hav(
num x) → num - Returns haversine(angle-in-radians).
-
havDistance(
num lat1, num lat2, num dLng) → num - Returns hav() of distance from (lat1, lng1) to (lat2, lng2) on the unit sphere.
-
havFromSin(
num x) → num -
inverseMercator(
num y) → num - Returns latitude from mercator Y.
-
mercator(
num lat) → num - Returns mercator Y corresponding to latitude.
-
mod(
num x, num m) → num - Returns the non-negative remainder of x / m.
-
sinFromHav(
num h) → num -
sinSumFromHav(
num x, num y) → num -
wrap(
num n, num min, num max) → num -
Wraps the given value into the inclusive-exclusive interval between min and max.
n
The value to wrap.