4 ms·
J2ME was missing floating point. Remember the flip phones and candy bar phones of the 2000s prior to the iPhone? I remember having to use an int to have 16 bi
by DannyB2 7y ago
J2ME was missing floating point. Remember the flip phones and candy bar phones of the 2000s prior to the iPhone? I remember having to use an int to have 16 bits to left and 16 bits to right of "binary point". Then have simplistic trig functions on these. And functions to convert between an ordinary int and this "fixed point within an int" type.
- monocasa 7y agoI'm pretty sure you could use float, it was just heavily discouraged for games since the VM typically executed the float bytecodes in software.
- DannyB2 7y agoI specifically remember that float was not available. It was a big effort to overcome that to have basic trig functions good enough to make an "asteroids" type game. I read about it not being available. The textbooks said so. I checked. It was a compile error to use float. Here are a couple of links. Remember this was a very long time ago. Like 20 years. https://books.google.com/books?id=O4m0TrliwscC&pg=PA297&lpg=PA297&dq=j2md+lacked+float&source=bl&ots=T72po8GzBx&sig=ACfU3U0HFwXSRpk-y_-OdQg417qpccTXGw&hl=en&sa=X&ved=2ahUKEwjVyfPR5ZLoAhUaknIEHR0tAwAQ6AEwAHoECAoQAQ#v=onepage&q=j2md%20lacked%20float&f=false https://books.google.com/books?id=O4m0TrliwscC&pg=PA297&lpg=... https://www.javaworld.com/article/2076023/go-wireless-with-j2me-and-more.html https://www.javaworld.com/article/2076023/go-wireless-with-j...