View Full Version : Math routines for J2ME

Brent Mason
10-13-2003, 07:58 PM
Since J2ME has removed all floating point support is there anything special you use for SQRT functionality etc? some Integer Math Classes?

Also, when you are creating your classes for the small devices, do you limit your creativity and create fewer classes to save memory, or just pretty much do business as usual?


10-15-2003, 12:58 PM
J2ME I have not worked with. Maybe you meant BREW?

I have not attemped to do any complex math yet on a BREW phone.

There is some info here though: (this link is a great forum for BREW info btw!)

http://brewforums.qualcomm.com/showthr....math%2A (http://brewforums.qualcomm.com/showthread.php?s=&threadid=1364&highlight=%2Amath%2A)

I pretty much code the same. I do use #defines more and keep my classes a bit simpler though. (I stay away from complex class hierarchies in BREW, I don't think I've ever even subclassed anything yet)

There is no reason not to use the C++ features, the CPU's aren't bad, it's the screen updates that will kill you! (just adding a clear screen before a blit can drop FPS by 10%.. !)