Package-leveldeclarations

Types

class PositiveDouble(val value: Double)

Double number with value greater equals zero.

class StrictlyPositiveDouble(val value: Double)

Double number with value greater zero.

class ZeroOneDouble(val value: Double)

Double number with values between zero and one inclusive.

Properties

Value to multiply a degree value by, to convert to radians.

const val HALF_PI: Double

Value of PI/2 as double. (90 degrees)

const val INV_PI: Double

Value of 1/PI as double.

const val INV_TWO_PI: Double

Value of 1/(2PI) as double.

const val PI: Double

Value of PI as double. (180 degrees)

const val QUARTER_PI: Double

Value of PI/4 as double. (45 degrees)

Value to multiply a radian value by, to convert to degrees.

Value of PI3/4 as double. (135 degrees)

const val TWO_PI: Double

Value of 2PI as double. (360 degrees)

Functions

fun fuzzyCompare(a: Double, b: Double, tolerance: Double): Int

Returns the comparison of a and b with a defined tolerance.

fun fuzzyEquals(a: Double, b: Double, tolerance: Double): Boolean

Returns if a equals b with a defined tolerance.

Returns true, if a<= b with a tolerance.

Returns true, if a>= b with a tolerance.

fun normalizeAngle(angle: Double, center: Double = PI): Double

Normalizes an angle around the center.