test triangle rendered?
This commit is contained in:
@@ -20,6 +20,10 @@ typedef union {
|
||||
} s;
|
||||
} com_vec_t;
|
||||
|
||||
static inline com_vec_t com_vec_from(com_fix_t x, com_fix_t y, com_fix_t z) {
|
||||
return (com_vec_t){.s = {.x = x, .y = y, .z = z}};
|
||||
}
|
||||
|
||||
static inline com_vec_t com_vec_identity(void) {
|
||||
return (com_vec_t){.s = {.x = COM_FIX_FRACUNIT,
|
||||
.y = COM_FIX_FRACUNIT,
|
||||
@@ -88,4 +92,18 @@ static inline com_vec_t com_vec_nrm(com_vec_t a) {
|
||||
.z = com_fix_div(a.s.z, n)}};
|
||||
}
|
||||
|
||||
static inline com_fix_t com_vec_min(com_vec_t a) {
|
||||
return com_fix_min(com_fix_min(a.a[0], a.a[1]), a.a[2]);
|
||||
}
|
||||
|
||||
static inline com_fix_t com_vec_max(com_vec_t a) {
|
||||
return com_fix_max(com_fix_max(a.a[0], a.a[1]), a.a[2]);
|
||||
}
|
||||
|
||||
static inline void com_vec_print(com_vec_t a) {
|
||||
com_fix_print(a.a[0]);
|
||||
com_fix_print(a.a[1]);
|
||||
com_fix_print(a.a[2]);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user