Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbATANFULL

Author
Message
Dimension
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 26th Aug 2010 01:58
I'm trying to use this function for calculating angles and acording to the description of the function it's suppose to calculate from 0 to 360 degrees but it goes from 0 to 180 to 0(see example bellow). Does anybody know why it does this?

Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 26th Aug 2010 11:01
Dark GDK likes to return negative angles when the angle is between 180-359. So instead of 270 it gives you -90. You can see the negative sign in the output of your program. If the result is negative, deduct it from 360 (actually add, not deduct, since it is already negative) and you're done.

(P.S. Just in case you don't know yet, using dbStr like this causes memory leak, it's OK for testing but don't leave it in the final program.)

Login to post a reply

Server time is: 2024-07-02 09:45:25
Your offset time is: 2024-07-02 09:45:25