function lengthToRadians(distance, units) {
    if (units === void 0) { units = "kilometers"; }
    var factor = exports.factors[units];
    if (!factor) {
        throw new Error(units + " units is invalid");
    }
    return distance / factor;
}
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

@name lengthToRadians
@param {number} distance in real units
@param {string} [units="kilometers"] can be degrees, radians, miles, inches, yards, metres,
meters, kilometres, kilometers.
@returns {number} radians