Package-level declarations

Types

Link copied to clipboard
value class Angle(val radians: Double) : Comparable<Angle>

An angle, its unit spelled at the call site: 90.deg, 0.8.rad.

Properties

Link copied to clipboard

This value as an Angle in degrees: 22.5.deg. The radian conversion is raw, at full Double precision.

This value as an Angle in degrees: 90.deg. The radian conversion is raw, at full Double precision.

Link copied to clipboard

This value as an Angle in radians: 0.8.rad.

This value as an Angle in radians: 2.rad.

Link copied to clipboard
const val SCALE: Double

The rounding scale of the module's identity: values that round to the same multiple of 1.0 / SCALE compare equal.

Functions

Link copied to clipboard
fun round(angle: Angle): Angle

Rounds angle to the nearest multiple of the identity quantum 1.0 / SCALE radians.

fun round(value: Double): Double

Rounds value to the nearest multiple of the identity quantum 1.0 / SCALE.

Link copied to clipboard
operator fun Double.times(angle: Angle): Angle

Double * Angle => Angle
Returns angle scaled by this factor.