mat2.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright (c), Recep Aslantas.
  3. *
  4. * MIT License (MIT), http://opensource.org/licenses/MIT
  5. * Full license can be found in the LICENSE file
  6. */
  7. #ifndef cglmc_mat2_h
  8. #define cglmc_mat2_h
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include "../cglm.h"
  13. CGLM_EXPORT
  14. void
  15. glmc_mat2_copy(mat2 mat, mat2 dest);
  16. CGLM_EXPORT
  17. void
  18. glmc_mat2_identity(mat2 mat);
  19. CGLM_EXPORT
  20. void
  21. glmc_mat2_identity_array(mat2 * __restrict mat, size_t count);
  22. CGLM_EXPORT
  23. void
  24. glmc_mat2_zero(mat2 mat);
  25. CGLM_EXPORT
  26. void
  27. glmc_mat2_mul(mat2 m1, mat2 m2, mat2 dest);
  28. CGLM_EXPORT
  29. void
  30. glmc_mat2_transpose_to(mat2 m, mat2 dest);
  31. CGLM_EXPORT
  32. void
  33. glmc_mat2_transpose(mat2 m);
  34. CGLM_EXPORT
  35. void
  36. glmc_mat2_mulv(mat2 m, vec2 v, vec2 dest);
  37. CGLM_EXPORT
  38. float
  39. glmc_mat2_trace(mat2 m);
  40. CGLM_EXPORT
  41. void
  42. glmc_mat2_scale(mat2 m, float s);
  43. CGLM_EXPORT
  44. float
  45. glmc_mat2_det(mat2 mat);
  46. CGLM_EXPORT
  47. void
  48. glmc_mat2_inv(mat2 mat, mat2 dest);
  49. CGLM_EXPORT
  50. void
  51. glmc_mat2_swap_col(mat2 mat, int col1, int col2);
  52. CGLM_EXPORT
  53. void
  54. glmc_mat2_swap_row(mat2 mat, int row1, int row2);
  55. CGLM_EXPORT
  56. float
  57. glmc_mat2_rmc(vec2 r, mat2 m, vec2 c);
  58. CGLM_EXPORT
  59. void
  60. glmc_mat2_make(const float * __restrict src, mat2 dest);
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #endif /* cglmc_mat2_h */