diff options
Diffstat (limited to 'arm9/lib/src/FX_mtx22.c')
-rw-r--r-- | arm9/lib/src/FX_mtx22.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arm9/lib/src/FX_mtx22.c b/arm9/lib/src/FX_mtx22.c index 38387c64..a74bb25c 100644 --- a/arm9/lib/src/FX_mtx22.c +++ b/arm9/lib/src/FX_mtx22.c @@ -3,10 +3,10 @@ #include "fx.h" ARM_FUNC void MTX_ScaleApply22(struct Mtx22 *mtx, struct Mtx22 *dst, fx32 x, fx32 y){ - dst->_[0] = ((fx64)x * mtx->_[0]) >> FX32_INT_SHIFT; - dst->_[1] = ((fx64)x * mtx->_[1]) >> FX32_INT_SHIFT; - dst->_[2] = ((fx64)y * mtx->_[2]) >> FX32_INT_SHIFT; - dst->_[3] = ((fx64)y * mtx->_[3]) >> FX32_INT_SHIFT; + dst->_[0] = (fx32)(((fx64)x * mtx->_[0]) >> FX32_INT_SHIFT); + dst->_[1] = (fx32)(((fx64)x * mtx->_[1]) >> FX32_INT_SHIFT); + dst->_[2] = (fx32)(((fx64)y * mtx->_[2]) >> FX32_INT_SHIFT); + dst->_[3] = (fx32)(((fx64)y * mtx->_[3]) >> FX32_INT_SHIFT); } ARM_FUNC asm void MTX_Identity22_(struct Mtx22 *mtx){ |