diff options
| author | realtradam <[email protected]> | 2023-06-16 01:18:13 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-06-16 01:18:13 -0400 |
| commit | a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807 (patch) | |
| tree | f7e358545f5043df20695d0cf51dcf8caa10cb12 /include/rodeo/math/vec3.h | |
| parent | 425516a9c53183179c43517f1b6501a790378a05 (diff) | |
| download | RodeoKit-a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807.tar.gz RodeoKit-a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807.zip | |
matrix math wrapper as well as various refactors for consistant and cleaner code
Diffstat (limited to 'include/rodeo/math/vec3.h')
| -rw-r--r-- | include/rodeo/math/vec3.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/rodeo/math/vec3.h b/include/rodeo/math/vec3.h new file mode 100644 index 0000000..1b9cd31 --- /dev/null +++ b/include/rodeo/math/vec3.h @@ -0,0 +1,53 @@ +#pragma once + +// -- internal -- +// public +#include "rodeo/math/vec3_t.h" + +rodeo_math_vec3_t +rodeo_math_vec3_zero(void); + +rodeo_math_vec3_t +rodeo_math_vec3_one(void); + +float +rodeo_math_vec3_dot(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +float +rodeo_math_vec3_cross(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +rodeo_math_vec3_t +rodeo_math_vec3_add(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +rodeo_math_vec3_t +rodeo_math_vec3_subtract(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +rodeo_math_vec3_t +rodeo_math_vec3_multiply(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +rodeo_math_vec3_t +rodeo_math_vec3_scale(rodeo_math_vec3_t a, float b); + +rodeo_math_vec3_t +rodeo_math_vec3_divide(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +rodeo_math_vec3_t +rodeo_math_vec3_negate(rodeo_math_vec3_t a); + +rodeo_math_vec3_t +rodeo_math_vec3_normalize(rodeo_math_vec3_t a); + +rodeo_math_vec3_t +rodeo_math_vec3_rotate(rodeo_math_vec3_t a, float turns, rodeo_math_vec3_t axis); + +float +rodeo_math_vec3_distance(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +float +rodeo_math_vec3_distanceSq(rodeo_math_vec3_t a, rodeo_math_vec3_t b); + +rodeo_math_vec3_t +rodeo_math_vec3_clamp(rodeo_math_vec3_t a, float minimum, float maximum); + +rodeo_math_vec3_t +rodeo_math_vec3_lerp(rodeo_math_vec3_t from, rodeo_math_vec3_t to, float t); |
