
bug in inverse trig functions 
Senior Member
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States

05232010, 08:44 PM
Yeah, I thought that it was a big bug too when I did my compass program, but I found out that Alice is actually just returning a radian to you. In order to turn it into a degree you have to multiply by (180/pi). That comes out to around 57.29577, so when you get the radian just do (radian * 57.29577), and it will return the correct angle to you. You can then divide that number by 360 to get the number that an object in Alice turns at, for example 90 degrees divided by 360 is 0.25, and turning an object 0.25 will turn that object 90 degrees in the program.
Check out my compass program to see how I did all this: http://www.alice.org/community/showthread.php?t=4459 EDIT: Yay, 555 posts TicTacToe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548 Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408 RealTime Clock .................. http://www.alice.org/community/showthread.php?p=12725 Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301 


thanks 
problem 
Thread Tools  
Display Modes  

