Package-level declarations

Types

Link copied to clipboard
value class AngleF(val radians: Float) : Comparable<AngleF>

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

Link copied to clipboard

Represents a 32-bit representation of RGBA color.

Link copied to clipboard
value class ComplexF

Represents a complex number composed of two single-precision 32-bit IEEE 754 floating point numbers for real and imaginary parts.

Link copied to clipboard
value class Flags16(val shortValue: Short) : Collection<Boolean>

Represents a collection of sixteen bit flags.

Link copied to clipboard
value class Flags32(val intValue: Int) : Collection<Boolean>

Represents a collection of thirty-two bit flags.

Link copied to clipboard
value class Flags64(val longValue: Long) : Collection<Boolean>

Represents a collection of sixty-four bit flags.

Link copied to clipboard
value class Flags8(val byteValue: Byte) : Collection<Boolean>

Represents a collection of eight bit flags.

Link copied to clipboard
value class Vector2F

Represents a vector of two single-precision 32-bit IEEE 754 floating point numbers.

Link copied to clipboard

An array of Vector2F values.

Link copied to clipboard

An iterator over a sequence of values of type Vector2F

Link copied to clipboard

Represents a read-only view over Vector2FArray type with methods that avoid boxing. Changes in the original array are reflected in this list.

Link copied to clipboard

An iterator over a Vector2F collection that supports indexed access.

Link copied to clipboard

Represents a read-only view of the portion of Vector2FList. Changes in the original list are reflected in this list.

Link copied to clipboard
value class Vector2I

Represents a vector of two 32-bit signed integers.

Link copied to clipboard

An array of Vector2I values.

Link copied to clipboard

An iterator over a sequence of values of type Vector2I

Link copied to clipboard

Represents a read-only view over Vector2IArray type with methods that avoid boxing. Changes in the original array are reflected in this list.

Link copied to clipboard

An iterator over a Vector2I collection that supports indexed access.

Link copied to clipboard

Represents a read-only view of the portion of Vector2IList. Changes in the original list are reflected in this list.

Properties

Link copied to clipboard

Returns a complex number with the specified imaginary value.

Functions

Link copied to clipboard
inline fun abs(value: ComplexF): Float

Returns the absolute value of the specified complex number.

Link copied to clipboard
inline fun acos(value: ComplexF): ComplexF

Returns the arc cosine of the specified complex number.

inline fun acos(x: Float): AngleF

Computes the arc cosine of the value x; the returned value is an angle in the range from 0.0 to PI radians.

Link copied to clipboard
inline fun asin(value: ComplexF): ComplexF

Returns the arc sine of the specified complex number.

inline fun asin(x: Float): AngleF

Computes the arc sine of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Link copied to clipboard
inline fun atan(value: ComplexF): ComplexF

Returns the arc tangent of the specified complex number.

inline fun atan(x: Float): AngleF

Computes the arc tangent of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Link copied to clipboard
inline fun atan2(y: Float, x: Float): AngleF

Returns the angle theta of the polar coordinates (r, theta) that correspond to the rectangular coordinates (x, y) by computing the arc tangent of the value y / x; the returned value is an angle in the range from -PI to PI radians.

Link copied to clipboard
inline fun conjugate(value: ComplexF): ComplexF

Returns the conjugate of the specified complex number.

Link copied to clipboard
inline fun cos(angle: AngleF): Float

Computes the cosine of the given angle.

inline fun cos(value: ComplexF): ComplexF

Returns the cosine of the specified complex number.

Link copied to clipboard
inline fun cosh(value: ComplexF): ComplexF

Returns the hyperbolic cosine of the specified complex number.

Link copied to clipboard
operator fun Float.div(other: ComplexF): ComplexF

Divides this real number by the other complex number.

inline operator fun Float.div(other: Vector2F): Vector2F

Divides this scalar by the other vector.

Link copied to clipboard
inline fun exp(value: ComplexF): ComplexF

Returns the E constant to the power of specified complex number.

Link copied to clipboard

Returns an interpolator value of the linearly interpolated vector t between a and b vectors.

inline fun inverseLerp(a: Double, b: Double, t: Double): Double
inline fun inverseLerp(a: Float, b: Float, t: Float): Float

Returns an interpolator value of the linearly interpolated value t between a and b.

Link copied to clipboard

Returns an interpolator value of the linearly interpolated value t between a and b.

Link copied to clipboard
inline fun Double.isApproximately(other: Double, epsilon: Double = 1.0E-10): Boolean
inline fun Float.isApproximately(other: Float, epsilon: Float = 1.0E-5f): Boolean

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

Link copied to clipboard
inline fun lerp(a: ColorRGBA32, b: ColorRGBA32, t: Float): ColorRGBA32

Returns a linearly interpolated color between a and b colors.

inline fun lerp(a: Vector2F, b: Vector2F, t: Vector2F): Vector2F

Returns a component-wise linearly interpolated vector between a and b vectors.

inline fun lerp(a: Vector2F, b: Vector2F, t: Float): Vector2F

Returns a linearly interpolated vector between a and b vectors.

inline fun lerp(a: Double, b: Double, t: Double): Double
inline fun lerp(a: Float, b: Float, t: Float): Float

Returns a linearly interpolated value between a and b.

Link copied to clipboard
inline fun Float.Companion.lerp(a: Float, b: Float, t: Float): Float

Returns a linearly interpolated value between a and b.

Link copied to clipboard
inline fun ln(value: ComplexF): ComplexF

Returns the natural logarithm (base E) of the specified complex number.

Link copied to clipboard
inline fun log(value: ComplexF, base: Float): ComplexF

Returns the logarithm of the specified complex number to the given base.

Link copied to clipboard
inline fun log10(value: ComplexF): ComplexF

Returns the common logarithm (base 10) of the specified complex number.

Link copied to clipboard
inline fun log2(value: ComplexF): ComplexF

Returns the binary logarithm (base 2) of the specified complex number.

Link copied to clipboard
inline fun max(a: AngleF, b: AngleF): AngleF

Returns the greater of two values.

inline fun max(a: Vector2F, b: Vector2F): Vector2F
inline fun max(a: Vector2I, b: Vector2I): Vector2I

Returns a vector that is made from the largest components of two vectors.

Link copied to clipboard
inline fun min(a: AngleF, b: AngleF): AngleF

Returns the smaller of two values.

inline fun min(a: Vector2F, b: Vector2F): Vector2F
inline fun min(a: Vector2I, b: Vector2I): Vector2I

Returns a vector that is made from the smallest components of two vectors.

Link copied to clipboard
inline operator fun Float.minus(other: ComplexF): ComplexF

Subtracts the other complex number from this real number.

Link copied to clipboard
inline fun nlerp(a: ComplexF, b: ComplexF, t: Float): ComplexF

Returns a normalized linear interpolation of two rotations a and b with interpolator value of t.

Link copied to clipboard
inline operator fun Float.plus(other: ComplexF): ComplexF

Adds the other complex number to this real number.

Link copied to clipboard
inline fun sin(angle: AngleF): Float

Computes the sine of the given angle.

inline fun sin(value: ComplexF): ComplexF

Returns the sine of the specified complex number.

Link copied to clipboard
inline fun sinh(value: ComplexF): ComplexF

Returns the hyperbolic sine of the specified complex number.

Link copied to clipboard
inline fun slerp(a: ComplexF, b: ComplexF, t: Float): ComplexF

Returns a spherical linear interpolation of two rotations a and b with interpolator value of t.

Link copied to clipboard
inline fun sqrt(value: ComplexF): ComplexF

Returns the square root of the specified complex number.

Link copied to clipboard
@JvmName(name = "sumOfVector2F")
fun Array<out Vector2F>.sum(): Vector2F
@JvmName(name = "sumOfVector2I")
fun Array<out Vector2I>.sum(): Vector2I

Returns the sum of all elements in the array.

@JvmName(name = "sumOfVector2F")
fun Iterable<Vector2F>.sum(): Vector2F
@JvmName(name = "sumOfVector2I")
fun Iterable<Vector2I>.sum(): Vector2I

Returns the sum of all elements in the collection.

Link copied to clipboard
@JvmName(name = "sumOfVector2F")
inline fun <T> Array<out T>.sumOf(selector: (T) -> Vector2F): Vector2F
@JvmName(name = "sumOfVector2I")
inline fun <T> Array<out T>.sumOf(selector: (T) -> Vector2I): Vector2I

Returns the sum of all values produced by selector function applied to each element in the array.

@JvmName(name = "sumOfVector2F")
inline fun <T> Iterable<T>.sumOf(selector: (T) -> Vector2F): Vector2F
@JvmName(name = "sumOfVector2I")
inline fun <T> Iterable<T>.sumOf(selector: (T) -> Vector2I): Vector2I

Returns the sum of all values produced by selector function applied to each element in the collection.

Link copied to clipboard
inline fun tan(angle: AngleF): Float

Computes the tangent of the given angle.

inline fun tan(value: ComplexF): ComplexF

Returns the tangent of the specified complex number.

Link copied to clipboard
inline fun tanh(value: ComplexF): ComplexF

Returns the hyperbolic tangent of the specified complex number.

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

Multiplies this value by the other value.

inline operator fun Float.times(other: ComplexF): ComplexF

Multiplies this real number by the other complex number.

inline operator fun Float.times(other: Vector2F): Vector2F

Multiplies this scalar by the other vector.

inline operator fun Int.times(other: Vector2I): Vector2I

Multiplies this vector by the other scalar.

Link copied to clipboard
inline fun Float.toComplexF(): ComplexF

Converts this Float value to ComplexF.

Link copied to clipboard

Returns an array of Vector2F containing all the elements of this generic array.

Link copied to clipboard

Returns an array of Vector2I containing all the elements of this generic array.

Link copied to clipboard

Returns an empty Vector2FArray.

inline fun <T : Vector2F> vector2FArrayOf(vararg elements: T): Vector2FArray

Returns a new Vector2FArray of given elements.

inline fun vector2FArrayOf(element: Vector2F): Vector2FArray

Returns a new Vector2FArray containing only the specified element.

Link copied to clipboard

Returns an empty Vector2IArray.

inline fun <T : Vector2I> vector2IArrayOf(vararg elements: T): Vector2IArray

Returns a new Vector2IArray of given elements.

inline fun vector2IArrayOf(element: Vector2I): Vector2IArray

Returns a new Vector2IArray containing only the specified element.