#### Archived

This topic is now archived and is closed to further replies.

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

When I put a value into acos/asin, I always get a value -Pi/2 < angle < Pi/2. But, I want to know how to get an angle 0 < angle < 2*Pi. Someone help please?

##### Share on other sites
if(theta < 0.0f)  theta += 2*PI;

##### Share on other sites
That really only works for angles in the fourth quadrant. Angles that are Pi/2 < angle < 3*Pi/2 are still erroneous.

##### Share on other sites
You will have to find another way of doing this, not by asin/acos...
the reason? the sin and cos functions arent inversible in it entire domain (thats it, [0,2*pi) ). The reason to this is that there are always two angles that have the same sin...
for example:

sin(pi/6)=0.5
sin(5*pi/6)=0.5

so, asin(0.5) would be pi/6 or 5*pi/6??
for that reason, the image of asin is defined only in 2 quadrants.

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 9
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
633331
• Total Posts
3011394
• ### Who's Online (See full list)

There are no registered users currently online

×