fixed cos sin

This commit is contained in:
veclavtlica committed 2026-09-11 15:09:47 +03:00
1 parent adfae10938
commit 6d7fe7392a
10 files changed
+345 -6

No files matched your search

+6
View File
@@ -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),