diff options
-rw-r--r-- | arm9/lib/src/FX_vec_c.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arm9/lib/src/FX_vec_c.c b/arm9/lib/src/FX_vec_c.c index a2e0ffe4..bebf7ca0 100644 --- a/arm9/lib/src/FX_vec_c.c +++ b/arm9/lib/src/FX_vec_c.c @@ -2,33 +2,33 @@ #include "main.h" #include "fx.h" -void VEC_Add(struct Vecx32 *x, struct Vecx32 *y, struct Vecx32 *dst){ - dst->x = x->x + y->x; - dst->y = x->y + y->y; - dst->z = x->z + y->z; +void VEC_Add(struct Vecx32 *a, struct Vecx32 *b, struct Vecx32 *dst){ + dst->x = a->x + b->x; + dst->y = a->y + b->y; + dst->z = a->z + b->z; } -void VEC_Subtract(struct Vecx32 *x, struct Vecx32 *y, struct Vecx32 *dst){ - dst->x = x->x - y->x; - dst->y = x->y - y->y; - dst->z = x->z - y->z; +void VEC_Subtract(struct Vecx32 *a, struct Vecx32 *b, struct Vecx32 *dst){ + dst->x = a->x - b->x; + dst->y = a->y - b->y; + dst->z = a->z - b->z; } -void VEC_Fx16Add(struct Vecx16 *x, struct Vecx16 *y, struct Vecx16 *dst){ - dst->x = x->x + y->x; - dst->y = x->y + y->y; - dst->z = x->z + y->z; +void VEC_Fx16Add(struct Vecx16 *a, struct Vecx16 *b, struct Vecx16 *dst){ + dst->x = a->x + b->x; + dst->y = a->y + b->y; + dst->z = a->z + b->z; } -s32 VEC_DotProduct(struct Vecx32 *x, struct Vecx32 *y){ - return ((s64)x->x * y->x + (s64)x->y * y->y + (s64)x->z * y->z + (1 << (FX64_INT_SHIFT - 1))) >> FX64_INT_SHIFT; +s32 VEC_DotProduct(struct Vecx32 *a, struct Vecx32 *b){ + return ((s64)a->x * b->x + (s64)a->y * b->y + (s64)a->z * b->z + (1 << (FX64_INT_SHIFT - 1))) >> FX64_INT_SHIFT; } -s32 VEC_Fx16DotProduct(struct Vecx16 *x, struct Vecx16 *y){ +s32 VEC_Fx16DotProduct(struct Vecx16 *a, struct Vecx16 *b){ s32 temp1, temp2; - temp1 = (x->x * y->x) + (x->y * y->y); - temp2 = (x->z * y->z) + (1 << (FX64_INT_SHIFT - 1)); + temp1 = (a->x * b->x) + (a->y * b->y); + temp2 = (a->z * b->z) + (1 << (FX64_INT_SHIFT - 1)); return (s32)(((s64)temp1 + temp2) >> FX64_INT_SHIFT); } -void VEC_CrossProduct(struct Vecx32 *x, struct Vecx32 *y, struct Vecx32 *); +void VEC_CrossProduct(struct Vecx32 *a, struct Vecx32 *b, struct Vecx32 *dst); |