summaryrefslogtreecommitdiff
path: root/include/cglm/call/mat2.h
blob: c2689383c3144f9c7c3ab30a9f6382127c23cb8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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 */