Hi,
I've just switched my compiler from ADS to GCC, and I noticed a few odd things had started going wrong. I then realised, it was the sin() and cos() routines that weren't working correctly.
If you are using DevKitAdv, then do this, it may solve your problem:
First, make sure you are doing "#include <math.h>"
Secondly, in gp32.mk, add "-lm" onto the end of the libraries line.
This will get sin() working, BUT, the results may not be correct.
Lastly, in gp32.mk again, check in the CFLAGS or CPPFLAGS for "-fshort-double \", if that is there, REMOVE IT! - what this does, it make all of your doubles, into floats, while I think this could cause a speed boost for some programs (?), since all the math functions, sin(), cos() etc... work on doubles, it seems to cause incorrect results.
Try this fix, and let me know if it works
-Toris
I've just switched my compiler from ADS to GCC, and I noticed a few odd things had started going wrong. I then realised, it was the sin() and cos() routines that weren't working correctly.
If you are using DevKitAdv, then do this, it may solve your problem:
First, make sure you are doing "#include <math.h>"
Secondly, in gp32.mk, add "-lm" onto the end of the libraries line.
This will get sin() working, BUT, the results may not be correct.
Lastly, in gp32.mk again, check in the CFLAGS or CPPFLAGS for "-fshort-double \", if that is there, REMOVE IT! - what this does, it make all of your doubles, into floats, while I think this could cause a speed boost for some programs (?), since all the math functions, sin(), cos() etc... work on doubles, it seems to cause incorrect results.
Try this fix, and let me know if it works
-Toris