lib/turf/helpers.rb
# 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
# @see https://turfjs.org/docs/#radiansToLength
# @param radians [number] in radians across the sphere
# @param units [string] can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers.
# @return [number] distance
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
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
def radians_to_length(radians, units = "kilometers")
    factor = FACTORS[units]
    raise Error, "#{units} units is invalid" unless factor
    radians * factor
  end
def radians_to_length ( radians , units = "kilometers" ) factor = FACTORS [ units ] raise Error , "#{units} units is invalid" unless factor radians * factor end
Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
Convert a distance measurement ( assuming a spherical Earth ) from radians to a more friendly unit .
None
number
radians
in radians across the sphere
in radians across the sphere
units
can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers.
can be degrees radians miles inches yards metres meters kilometres kilometers .
see
None