lengthToRadians
Description
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
Parameters
Name | Type | Description |
---|---|---|
distance | number | in real units |
units? | string | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. (default "kilometers") |
Returns
number radians
Installation
$ npm install @turf/helpers
import { lengthToRadians } from "@turf/helpers";
const result = lengthToRadians(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.lengthToRadians(...);