Trigonometry in CLDC 1.0 / MIDP 2.0 application

586 views Asked by At

How can I use trigonometry in CLDC 1.0 / MIDP 2.0 application? I need "sin cos tan asin acos atan atan2" functions from standart Math library.

Thanks

2

There are 2 answers

0
Ewan Todd On BEST ANSWER
0
gnat On

update to prior answer

gnat knows

Above link to Sun Forums became dead after migration to Oracle.

If memory serves, back then I suggested to consider MicroFloat library.

There is also a chance that mentioned Sun forums thread was migrated to this one: Sin & Cos with CLDC. Since message formatting was broken in migration and since no one knows if migrated thread will stay where it is now, here's the "snapshot" of what is there:

  • CLDC 1.0 (JSR 30) doesn't have float / double and trigonometric functions
    For devices limited to CLDC 1.0, search Google for 'CLDC Math library' - there's plenty info

  • CLDC 1.1 (JSR 139) has some trigonometric and double / float functions in Math package
    of functions mentioned in question, sin cos tan are there, asin acos atan atan2 aren't