Results 1 to 2 of 2
- 12-07-2011, 10:28 AM #1Member
- Join Date
- Nov 2011
- Rep Power
Sin() Wrong Results
I have the following java snippet:
zMove = Math.sin(rotationN);
zMove is a double, while rotationN is an integer.
The problem arises in the calculation. When rotationN is 30, the result should be 0.5. However, the output is -0.9880316240928618. What am I doing wrong, and what should I change? Thanks in advance.
EDIT: Solved. Apparently, it was working in Radians. Please, Mods, do not delete this post. Maybe someone with the same problem sees this. Thanks.
Last edited by MemoNick; 12-07-2011 at 10:34 AM.
- 12-07-2011, 03:21 PM #2
- By shacht1 in forum New To JavaReplies: 4Last Post: 06-11-2013, 01:37 AM
- By sara12345 in forum New To JavaReplies: 0Last Post: 04-12-2010, 04:49 PM
- By ‹bermenschen in forum Advanced JavaReplies: 4Last Post: 04-02-2010, 02:52 AM
- By Battlefeldt in forum New To JavaReplies: 0Last Post: 12-18-2009, 02:03 AM
- By JohnF8FJohn in forum New To JavaReplies: 1Last Post: 11-27-2008, 02:11 AM