Skip to main content
Version: 6.5.0

radiansToLength

Description

Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit. Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet

Parameters

NameTypeDescription
radiansnumberin radians across the sphere
units?stringcan be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. (default "kilometers")

Returns

    number distance

Installation

$ npm install @turf/helpers

import { radiansToLength } from "@turf/helpers";
const result = radiansToLength(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.radiansToLength(...);