fixed cos sin
This commit is contained in:
@@ -20,6 +20,12 @@ typedef union {
|
||||
} s;
|
||||
} com_vec_t;
|
||||
|
||||
static inline com_vec_t com_vec_identity(void) {
|
||||
return (com_vec_t){.s = {.x = COM_FIXED_FRACUNIT,
|
||||
.y = COM_FIXED_FRACUNIT,
|
||||
.z = COM_FIXED_FRACUNIT}};
|
||||
}
|
||||
|
||||
static inline com_vec_t com_vec_add(com_vec_t a, com_vec_t b) {
|
||||
return (com_vec_t){.s = {.x = com_fixed_add(a.s.x, b.s.x),
|
||||
.y = com_fixed_add(a.s.y, b.s.y),
|
||||
|
||||
Reference in New Issue
Block a user