refactor
This commit is contained in:
parent
84621fa281
commit
ae258447a5
0
COPYING.LESSER
Normal file → Executable file
0
COPYING.LESSER
Normal file → Executable file
0
exemple/exemple_geometry.c
Normal file → Executable file
0
exemple/exemple_geometry.c
Normal file → Executable file
0
exemple/exemple_matrix.c
Normal file → Executable file
0
exemple/exemple_matrix.c
Normal file → Executable file
0
sweet_geometry.c
Normal file → Executable file
0
sweet_geometry.c
Normal file → Executable file
0
sweet_geometry.h
Normal file → Executable file
0
sweet_geometry.h
Normal file → Executable file
9
sweet_macro.h
Normal file → Executable file
9
sweet_macro.h
Normal file → Executable file
@ -31,5 +31,14 @@
|
|||||||
#define mat3_new(...) _OVERLOAD_3_(__VA_ARGS__, mat3_new_3v, mat3_new_2v, mat3_new_m4, NULL)(__VA_ARGS__)
|
#define mat3_new(...) _OVERLOAD_3_(__VA_ARGS__, mat3_new_3v, mat3_new_2v, mat3_new_m4, NULL)(__VA_ARGS__)
|
||||||
#define mat4_new(...) _OVERLOAD_4_(__VA_ARGS__, mat4_new_4v, mat4_new_3v, mat4_new_2v, mat4_new_m4, NULL)(__VA_ARGS__)
|
#define mat4_new(...) _OVERLOAD_4_(__VA_ARGS__, mat4_new_4v, mat4_new_3v, mat4_new_2v, mat4_new_m4, NULL)(__VA_ARGS__)
|
||||||
|
|
||||||
|
#define swap(a, b, type) \
|
||||||
|
{\
|
||||||
|
type t;\
|
||||||
|
t = a;\
|
||||||
|
a = b;\
|
||||||
|
b = t;\
|
||||||
|
\
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
0
sweet_math.c
Normal file → Executable file
0
sweet_math.c
Normal file → Executable file
3
sweet_math.h
Normal file → Executable file
3
sweet_math.h
Normal file → Executable file
@ -55,6 +55,9 @@
|
|||||||
#define float_approx_zero(a, epsilon) \
|
#define float_approx_zero(a, epsilon) \
|
||||||
(a <= (epsilon) && a >= (epsilon))
|
(a <= (epsilon) && a >= (epsilon))
|
||||||
|
|
||||||
|
#define max(a, b) (a >= b ? a : b)
|
||||||
|
#define min(a, b) (a <= b ? a : b)
|
||||||
|
|
||||||
/* Vector */
|
/* Vector */
|
||||||
|
|
||||||
vec2 vec2_zero();
|
vec2 vec2_zero();
|
||||||
|
|||||||
0
sweet_matrix.c
Normal file → Executable file
0
sweet_matrix.c
Normal file → Executable file
0
sweet_matrix.h
Normal file → Executable file
0
sweet_matrix.h
Normal file → Executable file
0
sweet_types.h
Normal file → Executable file
0
sweet_types.h
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user