diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-25 15:10:37 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-25 15:10:37 -0600 |
| commit | 118980e02e59ff31871df59dce257075394f3533 (patch) | |
| tree | 26fba4492bb4b561d21bf49b35d892a821d54fab /include/cglm/call/mat2.h | |
| parent | 0e6e1245b70df4dfcba135d50e1b53d1a8ef7eb8 (diff) | |
wip
Diffstat (limited to 'include/cglm/call/mat2.h')
| -rw-r--r-- | include/cglm/call/mat2.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/include/cglm/call/mat2.h b/include/cglm/call/mat2.h new file mode 100644 index 0000000..c268938 --- /dev/null +++ b/include/cglm/call/mat2.h @@ -0,0 +1,83 @@ +/* + * Copyright (c), Recep Aslantas. + * + * MIT License (MIT), http://opensource.org/licenses/MIT + * Full license can be found in the LICENSE file + */ + +#ifndef cglmc_mat2_h +#define cglmc_mat2_h +#ifdef __cplusplus +extern "C" { +#endif + +#include "../cglm.h" + +CGLM_EXPORT +void +glmc_mat2_make(const float * __restrict src, mat2 dest); + +CGLM_EXPORT +void +glmc_mat2_copy(mat2 mat, mat2 dest); + +CGLM_EXPORT +void +glmc_mat2_identity(mat2 m); + +CGLM_EXPORT +void +glmc_mat2_identity_array(mat2 * __restrict mats, size_t count); + +CGLM_EXPORT +void +glmc_mat2_zero(mat2 m); + +CGLM_EXPORT +void +glmc_mat2_mul(mat2 m1, mat2 m2, mat2 dest); + +CGLM_EXPORT +void +glmc_mat2_mulv(mat2 m, vec2 v, vec2 dest); + +CGLM_EXPORT +void +glmc_mat2_transpose_to(mat2 mat, mat2 dest); + +CGLM_EXPORT +void +glmc_mat2_transpose(mat2 m); + +CGLM_EXPORT +void +glmc_mat2_scale(mat2 m, float s); + +CGLM_EXPORT +void +glmc_mat2_inv(mat2 mat, mat2 dest); + +CGLM_EXPORT +void +glmc_mat2_swap_col(mat2 mat, int col1, int col2); + +CGLM_EXPORT +void +glmc_mat2_swap_row(mat2 mat, int row1, int row2); + +CGLM_EXPORT +float +glmc_mat2_trace(mat2 m); + +CGLM_EXPORT +float +glmc_mat2_det(mat2 m); + +CGLM_EXPORT +float +glmc_mat2_rmc(vec2 r, mat2 m, vec2 c); + +#ifdef __cplusplus +} +#endif +#endif /* cglmc_mat2_h */ |
