This is where you talk about the NXJ software itself, installation issues, and programming talk.
Moderators: roger, 99jonathan, imaqine
by matejdro » Wed Apr 04, 2012 3:30 pm
- Code: Select all
Math.floor(4.0 / 8.0)
Above code returns -1, while it should return 0. Any idea, what am I doing wrong?
-
matejdro
- Novice
-
- Posts: 54
- Joined: Wed Mar 14, 2012 9:10 am
by skoehler » Wed Apr 04, 2012 4:28 pm
viewtopic.php?f=7&t=3202We will probably release an upgrade (0.9.1-3) which contains the fixes.
For now, just copy the floor/ceil/round methods from the SVN version of java.lang.Math to one of your own classes, and call them instead of java.lang.Math.
-
skoehler
- leJOS Team Member
-
- Posts: 1114
- Joined: Thu Oct 30, 2008 4:54 pm
Return to NXJ Software
Who is online
Users browsing this forum: Google [Bot] and 3 guests