diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-24 14:59:35 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-24 14:59:35 -0400 |
commit | 5c965f5357c09a9eaaad029441401498e0877966 (patch) | |
tree | 2b8049c703ac29c8a0e35ec63db11f277ba850c5 /src/math_util.c | |
parent | 23c07589f5c515cbf16db08881142b6ae76dc5ee (diff) |
Rename fixed point math routines again
Diffstat (limited to 'src/math_util.c')
-rw-r--r-- | src/math_util.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/math_util.c b/src/math_util.c index e13c36ea6..eff2fd7c0 100644 --- a/src/math_util.c +++ b/src/math_util.c @@ -1,7 +1,7 @@ #include "global.h" #include "math_util.h" -fx16 mulfx16(fx16 x, fx16 y) +fx16 Q_8_8_mul(fx16 x, fx16 y) { s32 result; @@ -11,7 +11,7 @@ fx16 mulfx16(fx16 x, fx16 y) return result; } -fxn16 mulfxn16(u8 s, fxn16 x, fxn16 y) +fxn16 Q_N_S_mul(u8 s, fxn16 x, fxn16 y) { s32 result; @@ -21,7 +21,7 @@ fxn16 mulfxn16(u8 s, fxn16 x, fxn16 y) return result; } -fx32 mulfx32(fx32 x, fx32 y) +fx32 Q_24_8_mul(fx32 x, fx32 y) { s64 result; @@ -31,7 +31,7 @@ fx32 mulfx32(fx32 x, fx32 y) return result; } -fx16 divfx16(fx16 x, fx16 y) +fx16 Q_8_8_div(fx16 x, fx16 y) { if (y == 0) { @@ -40,7 +40,7 @@ fx16 divfx16(fx16 x, fx16 y) return (x << 8) / y; } -fxn16 divfxn16(u8 s, fxn16 x, fxn16 y) +fxn16 Q_N_S_div(u8 s, fxn16 x, fxn16 y) { if (y == 0) { @@ -49,7 +49,7 @@ fxn16 divfxn16(u8 s, fxn16 x, fxn16 y) return (x << s) / y; } -fx32 divfx32(fx32 x, fx32 y) +fx32 Q_24_8_div(fx32 x, fx32 y) { s64 _x; @@ -62,7 +62,7 @@ fx32 divfx32(fx32 x, fx32 y) return _x / y; } -fx16 invfx16(fx16 y) +fx16 Q_8_8_inv(fx16 y) { s32 x; @@ -70,7 +70,7 @@ fx16 invfx16(fx16 y) return x / y; } -fxn16 invfxn16(u8 s, fxn16 y) +fxn16 Q_N_S_inv(u8 s, fxn16 y) { s32 x; @@ -78,7 +78,7 @@ fxn16 invfxn16(u8 s, fxn16 y) return x / y; } -fx32 invfx32(fx32 y) +fx32 Q_24_8_inv(fx32 y) { s64 x; |