Module: Angle

Provides constants and functions for working with angles.
Source:

Members

(static, constant) DEGREES_TO_RADIANS

Conversion factor for degrees to radians.
Source:

(static, constant) HALF_PI

pi / 2
Source:

(static, constant) RADIANS_TO_DEGREES

Conversion factor for radians to degrees.
Source:

(static, constant) TWO_PI

2 pi.
Source:

Methods

(static) isValidLatitude(degrees) → {Boolean}

Indicates whether a specified value is within the normal range of latitude, [-90, 90].
Parameters:
Name Type Description
degrees Number The value to test, in degrees.
Source:
Returns:
true if the value is within the normal range of latitude, otherwise false.
Type
Boolean

(static) isValidLongitude(degrees) → {boolean}

Indicates whether a specified value is within the normal range of longitude, [-180, 180].
Parameters:
Name Type Description
degrees Number The value to test, in degrees.
Source:
Returns:
true if the value is within the normal range of longitude, otherwise false.
Type
boolean

(static) normalizedDegrees(degrees) → {Number}

Normalizes a specified value to be within the range of [-180, 180] degrees.
Parameters:
Name Type Description
degrees Number The value to normalize, in degrees.
Source:
Returns:
The specified value normalized to [-180, 180] degrees.
Type
Number

(static) normalizedDegreesLatitude(degrees) → {Number}

Normalizes a specified value to be within the range of [-90, 90] degrees.
Parameters:
Name Type Description
degrees Number The value to normalize, in degrees.
Source:
Returns:
The specified value normalized to the normal range of latitude.
Type
Number

(static) normalizedDegreesLongitude(degrees) → {Number}

Normalizes a specified value to be within the range of [-180, 180] degrees.
Parameters:
Name Type Description
degrees Number The value to normalize, in degrees.
Source:
Returns:
The specified value normalized to the normal range of longitude.
Type
Number

(static) normalizedRadians(radians) → {Number}

Normalizes a specified value to be within the range of [-Pi, Pi] radians.
Parameters:
Name Type Description
radians Number The value to normalize, in radians.
Source:
Returns:
The specified value normalized to [-Pi, Pi] radians.
Type
Number

(static) normalizedRadiansLatitude(radians) → {Number}

Normalizes a specified value to be within the range of [-Pi/2, Pi/2] radians.
Parameters:
Name Type Description
radians Number The value to normalize, in radians.
Source:
Returns:
The specified value normalized to the normal range of latitude.
Type
Number

(static) normalizedRadiansLongitude(radians) → {Number}

Normalizes a specified value to be within the range of [-Pi, Pi] radians.
Parameters:
Name Type Description
radians Number The value to normalize, in radians.
Source:
Returns:
The specified value normalized to the normal range of longitude.
Type
Number

(static) toDecimalDegreesString(degrees) → {String}

Returns a decimal degrees string representation of a specified value in degrees.
Parameters:
Name Type Description
degrees Number The value for which to compute the string.
Source:
Returns:
The computed string, which is a decimal degrees value followed by the degree symbol.
Type
String

(static) toDMSString(degrees) → {String}

Returns a degrees-minutes-seconds string representation of a specified value in degrees.
Parameters:
Name Type Description
degrees Number The value for which to compute the string.
Source:
Returns:
The computed string in degrees, minutes and decimal seconds.
Type
String

(static) toDMString(degrees) → {String}

Returns a degrees-minutes string representation of a specified value in degrees.
Parameters:
Name Type Description
degrees Number The value for which to compute the string.
Source:
Returns:
The computed string in degrees and decimal minutes.
Type
String

(static) toString(degrees) → {String}

Returns a string representation of a specified value in degrees.
Parameters:
Name Type Description
degrees Number The value for which to compute the string.
Source:
Returns:
The computed string, which is a decimal degrees value followed by the degree symbol.
Type
String