Skip to main content

lib/math

Math utilities including Vector2, Vector3, and Color classes with immutable operations.

Classes

ClassDescription
Color-
DivisionByZeroExceptionAn exception thrown when a division by zero occurs.
ImmutableVectorExceptionAn exception thrown when attempting to mutate an immutable vector.
OutOfBoundsExceptionAn exception thrown when an index is out of bounds.
Vector2A 2D vector.
Vector3A 3D vector.

Functions

FunctionDescription
colorCreates a color from RGBA components.
vec2Creates a 2D vector from coordinates.
vec3Creates a 3D vector from coordinates.