Skip to main content
Version: Next

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

NameTypeDescription
distancenumberin real units
units?stringcan 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(...);