Marmalade SDK Exception Multiply Overflow

I was performing some transformations (scaling) on 2D sprites like this:
CIwMat2D matrix;
rot.Scale(IW_FIXED(2));
When I ran the app I received the following exception:
IwAssert failure (GEOM, 350). Message: Multiply overflow
The avoid this exception, you must set your matrix to the Identity matrix before applying transformations on it like this:
CIwMat2D matrix;
matrix.SetIdentity();
rot.Scale(IW_FIXED(2));

Related Posts by Categories

0 comments:

Post a Comment

Blog Archive

Powered by Blogger.