Angle

class Angle

Represents an angle measurement.

To create an object use either the extension function toAngle, or the extension properties degrees, or radians available on all Number types.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun convert(targetUnit: AngleUnit): Angle

Converts the angle to the specified unit.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code value for the object.

Link copied to clipboard
fun toDouble(targetUnit: AngleUnit): Double

Returns the value of this angle as a Double number of the specified targetUnit.

Link copied to clipboard
fun toFloat(targetUnit: AngleUnit): Float

Returns the value of this angle as a Float number of the specified targetUnit.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the object.

Properties

Link copied to clipboard
val unit: AngleUnit

The unit of the angle measurement.

Link copied to clipboard
val value: Double

The value of the angle measurement. Note that the value is not normalized. For example, 450 degrees will not be converted to 90 and remain as 450 degrees.