interpolate method - GeoCoordinates class - core library - Dart API
interpolate
interpolate method
- GeoCoordinates towardCoords,
- double factor
Computes the coordinates of the interpolated location along the great circle between the two coordinates.
The interpolation factor is clamped to the range [0.0, 1.0] where 0.0 identifies this
GeoCoordinates and 1.0 indicates the other coordinates.
The ratio between the distance to the interpolated coordinates and the distance to the other
coordinates is approximately equal to the interpolation factor. When both coordinates have
the altitude, then the altitude is interpolated as well; null otherwise.
-
towardCoordsCoordinates of the point to which the interpolation is directed. -
factorThe interpolation factor
Returns GeoCoordinates. interpolated coordinates
Implementation
GeoCoordinates interpolate(GeoCoordinates towardCoords, double factor) => $prototype.interpolate(this, towardCoords, factor);