Expand description
Sath
Safe math library
Installation
[dependencies]
sath = { git = "https://github.com/ItsEthra/sath.git" }
Usage
Please don’t, this was a toy library for a toy game engine.
Macros
Creates new complex number where
real
= first argument and imag
= second argument.Creates new matrix from individual elements.
If number of elements is
4
=> Matrix2 is created.
If number of elements is 9
=> Matrix3 is created.
If number of elements is 16
=> Matrix4 is created.Converts degrees to radians.
Creates new vector
If number of elements is
2
=> Vector2 is created.
If number of elements is 3
=> Vector3 is created.
If number of elements is 4
=> Vector4 is created.Structs
Complex number
Degrees marker type.
Euler angles
Row major 2x2 matrix.
Row major 3x3 matrix.
Row major 4x4 matrix.
Quaternion representing a rotation in 3d space.
Radians marker type.
2 Dimensional vector.
3 Dimensional vector.
4 Dimensional vector.
Traits
Type Definitions
Euler degree-float angles.
Euler degree-float angles.
Euler radian angles.
Euler radian angles.
Double precession Vector2.
Single precession Vector2.
Double precession Vector3.
Single precession Vector3.
Double precession Vector4.
Single precession Vector4.