If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
-
arras
- Posts: 1622
- Joined: Mon Apr 05, 2004 8:35 am
- Location: Slovakia
-
Contact:
Post
by arras »
May be this is simple and stupid, but when I write:
sin(90.0)
I get 0.893997 instead of 1.0
And when I write
cos(90.0)
I get -0.448074 instead of 0.0
Howe to get sin / cos to work right in C++ (I was working mostly in Basic till now)
-
Homer
- Posts: 58
- Joined: Tue Nov 18, 2003 7:11 pm
- Location: Germany
Post
by Homer »
I think the c sin and cos functions use radiants instead of degrees, so you have to convert your values (1° = 0.01745 rad).
-
arras
- Posts: 1622
- Joined: Mon Apr 05, 2004 8:35 am
- Location: Slovakia
-
Contact:
Post
by arras »
You think right

...thanks