AngleF

value class AngleF(val radians: Float) : Comparable<AngleF>

Represents an angle stored in single-precision 32-bit IEEE 754 floating point number.

On the JVM, non-nullable values of this type are represented as values of the primitive type float.

Constructors

Link copied to clipboard
constructor(radians: Float)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns the value of this angle in degrees.

Link copied to clipboard

Returns the value of this angle in radians.

Functions

Link copied to clipboard
inline fun coerceAtLeast(minimum: AngleF): AngleF

Ensures that this value is not less than the specified minimum.

Link copied to clipboard
inline fun coerceAtMost(maximum: AngleF): AngleF

Ensures that this value is not greater than the specified maximum.

Link copied to clipboard
inline fun coerceIn(minimum: AngleF, maximum: AngleF): AngleF

Ensures that this value lies in the specified range minimum..maximum.

Link copied to clipboard
open operator override fun compareTo(other: AngleF): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Link copied to clipboard
inline operator fun div(other: Float): AngleF

Divides this value by the other value.

Link copied to clipboard

Returns an angle that is coterminal to this angle and is in [0°, 360°) range.

Link copied to clipboard
inline fun isAcute(): Boolean

Returns true if this angle is in (0°, 90°) range, false otherwise.

Link copied to clipboard
inline fun isApproximately(other: AngleF, epsilon: AngleF = AngleF(0.00001f)): Boolean

Returns a value indicating whether this angle is approximately other angle given specified epsilon tolerance.

Link copied to clipboard
inline fun isApproximatelyCoterminalTo(other: AngleF, epsilon: AngleF = AngleF(0.00001f)): Boolean

Returns a value indicating whether this angle is approximately coterminal to the other angle given specified epsilon tolerance.

Link copied to clipboard
inline fun isObtuse(): Boolean

Returns true if this angle is in (90°, 180°) range, false otherwise.

Link copied to clipboard
inline fun isReflex(): Boolean

Returns true if this angle is in (180°, 360°) range, false otherwise.

Link copied to clipboard
inline operator fun minus(other: AngleF): AngleF

Subtracts the other value from this value.

Link copied to clipboard
inline fun mod(other: AngleF): AngleF

Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).

Link copied to clipboard
inline operator fun plus(other: AngleF): AngleF

Adds the other value to this value.

Link copied to clipboard
inline operator fun times(other: Float): AngleF

Multiplies this value by the other value.

Link copied to clipboard
inline fun toComplexF(): ComplexF

Converts this AngleF value to unit ComplexF with phaseAngle represented by the value of this instance.

Link copied to clipboard
inline fun toVector2F(): Vector2F

Converts this AngleF value to unit Vector2F with x and y components represented by the value of this instance.

Link copied to clipboard
inline operator fun unaryMinus(): AngleF

Returns this angle value scaled by -1.

Link copied to clipboard
inline operator fun unaryPlus(): AngleF

Returns this angle value.