Companion

object Companion

Properties

Link copied to clipboard

Returns an Angle equal to this Double number in degrees.

Link copied to clipboard

Conversion factor for degrees to milliradians (NATO).

Link copied to clipboard

Conversion factor for degrees to milliradians (Warsaw Pact).

Link copied to clipboard
const val DEGREES_TO_MINUTES: Double = 60.0

Conversion factor for degrees to minutes.

Link copied to clipboard

Conversion factor for degrees to minute of angle (MOA).

Link copied to clipboard

Conversion factor for degrees to milliradians.

Link copied to clipboard

Conversion factor for degrees to radians.

Link copied to clipboard
const val DEGREES_TO_SECONDS: Double = 3600.0

Conversion factor for degrees to seconds.

Link copied to clipboard

Conversion factor for degrees to milliradians (Sweden).

Link copied to clipboard

Conversion factor for milliradians (NATO) to degrees.

Link copied to clipboard

Conversion factor for milliradians (Warsaw Pact) to degrees.

Link copied to clipboard

Returns an Angle equal to this Double number in mil NATO.

Link copied to clipboard

Returns an Angle equal to this Double number in mil Warsaw Pact.

Link copied to clipboard

Represents an angle of 1 minute

Link copied to clipboard

Returns an Angle equal to this Double number in minutes.

Link copied to clipboard

Conversion factor for minutes to degrees.

Link copied to clipboard

Returns an Angle equal to this Double number in minute of angle (MOA).

Link copied to clipboard

Conversion factor for minute of angle (MOA) to degrees.

Link copied to clipboard

Returns an Angle equal to this Double number in milliradians.

Link copied to clipboard

Conversion factor for milliradians to degrees.

Link copied to clipboard

Represents an angle of negative 180 degrees

Link copied to clipboard

Represents an angle of negative 360 degrees

Link copied to clipboard

Represents a right angle of negative 90 degrees

Link copied to clipboard

Represents an angle of positive 180 degrees

Link copied to clipboard

Represents an angle of positive 360 degrees

Link copied to clipboard

Represents a right angle of positive 90 degrees

Link copied to clipboard

Returns an Angle equal to this Double number in radians.

Link copied to clipboard

Conversion factor for radians to degrees.

Link copied to clipboard

Represents an angle of 1 second

Link copied to clipboard

Returns an Angle equal to this Double number in seconds.

Link copied to clipboard

Conversion factor for seconds to degrees.

Link copied to clipboard

Returns an Angle equal to this Double number in Streck.

Link copied to clipboard

Conversion factor for milliradians (Sweden) to degrees.

Link copied to clipboard

Represents an angle of zero degrees

Functions

Link copied to clipboard

Obtains the average of two angles. This method is commutative, so midAngle(m, n) and midAngle(n, m) are equivalent.

Link copied to clipboard

Restricts an angle to the range -180, +180 degrees, clamping angles outside the range. Angles less than -180 are returned as -180, and angles greater than +180 are returned as +180. Angles within the range are returned unmodified.

Link copied to clipboard

Restricts an angle to the range 0, 360 degrees, clamping angles outside the range. Angles less than 0 are returned as 0, and angles greater than 360 are returned as 360. Angles within the range are returned unmodified.

Link copied to clipboard

Restricts an angle to the range -90, +90 degrees, clamping angles outside the range. Angles less than -90 are returned as -90, and angles greater than +90 are returned as +90. Angles within the range are returned unmodified.

Link copied to clipboard

Restricts an angle to the range -180, +180 degrees, clamping angles outside the range. Angles less than -180 are returned as 0, and angles greater than +180 are returned as +180. Angles within the range are returned unmodified.

Link copied to clipboard

Obtains an angle from a specified number of degrees.

Link copied to clipboard
fun fromDM(degrees: Int, minutes: Double): Angle

Obtain an angle from a given number of positive degrees and decimal minutes.

Link copied to clipboard
fun fromDMS(dmsString: String): Angle

Obtain an angle from a degrees, minute and seconds character string.

fun fromDMS(degrees: Int, minutes: Int, seconds: Double): Angle

Obtain an angle from a given number of positive degrees, minutes and seconds.

Link copied to clipboard

Obtains an angle from a specified number of mil NATO.

Link copied to clipboard

Obtains an angle from a specified number of mil Warsaw Pact.

Link copied to clipboard

Obtains an angle from a specified number of minutes.

Link copied to clipboard

Obtains an angle from a specified number of minute of angle (MOA).

Link copied to clipboard

Obtains an angle from a specified number of milliradians.

Link copied to clipboard

Obtains an angle from a specified number of radians.

Link copied to clipboard

Obtains an angle from a specified number of seconds.

Link copied to clipboard

Obtains an angle from a specified number of Streck.

Link copied to clipboard

Obtains an angle from rectangular coordinates.

Link copied to clipboard
fun interpolateAngle180(amount: Double, angle1: Angle, angle2: Angle): Angle

Computes the linear interpolation of two angles in the range -180, +180 degrees according to a specified fractional amount. The fractional amount is interpreted as a relative proportion of the two angles, where 0.0 indicates the first angle, 0.5 indicates an angle half way between the two angles, and 1.0 indicates the second angle.
The result of this method is undefined if the amount is outside the range 0, 1.

Link copied to clipboard
fun interpolateAngle360(amount: Double, angle1: Angle, angle2: Angle): Angle

Computes the linear interpolation of two angles in the range 0, 360 degrees according to a specified fractional amount. The fractional amount is interpreted as a relative proportion of the two angles, where 0.0 indicates the first angle, 0.5 indicates an angle half way between the two angles, and 1.0 indicates the second angle.
The result of this method is undefined if the amount is outside the range 0, 1.

Link copied to clipboard

Indicates whether a specified value is within the normal range of latitude, -90, 90.

Link copied to clipboard

Indicates whether a specified value is within the normal range of longitude, -180, 180.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Restricts an angle to the range -180, +180 degrees, wrapping angles outside the range. Wrapping takes place as though traversing the edge of a unit circle; angles less than -180 wrap back to +180, while angles greater than +180 wrap back to -180.

Link copied to clipboard

Restricts an angle to the range 0, 360 degrees, wrapping angles outside the range. Wrapping takes place as though traversing the edge of a unit circle; angles less than 0 wrap back to 360, while angles greater than 360 wrap back to 0.

Link copied to clipboard

Restricts an angle to the range -90, +90 degrees, wrapping angles outside the range. Wrapping takes place along a line of constant longitude which may pass through the poles. In which case, 135 degrees normalizes to 45 degrees; 181 degrees normalizes to -1 degree.

Link copied to clipboard

Restricts an angle to the range -180, +180 degrees, wrapping angles outside the range. Wrapping takes place as though traversing a line of constant latitude which may pass through the antimeridian; angles less than -180 wrap back to +180, while angles greater than +180 wrap back to -180.

Link copied to clipboard

Convert radians to degrees

Link copied to clipboard

Convert degrees to mil NATO

Link copied to clipboard

Convert degrees to mil Warsaw Pact

Link copied to clipboard

Convert degrees to minutes

Link copied to clipboard
fun toMOA(degrees: Double): Double

Convert degrees to minute of angle (MOA)

Link copied to clipboard
fun toMrad(degrees: Double): Double

Convert degrees to milliradians

Link copied to clipboard

Convert degrees to radians

Link copied to clipboard

Convert degrees to seconds

Link copied to clipboard

Convert degrees to Streck