Why does the LCD display 0000 for the following lines???

LCD.showNumber((int)Math.cos((double)0));
Because the Math library in Lejos calculates cos(0) as 0.99999 (I don't know the exact number of digits).

LCD.showNumber((int)(8000 * 1/4000));
No clue. My machine shows 0002 - using Lejos3, and Java 1.4.2 How about you?

Roger Glassey


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to