Archived

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

cos problem realy easy

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

Recommended Posts

what''s the function for inverse cosine?

Share on other sites
is there a function that does use radians. or can someone tell me the conversion i''ve forgotten it.

Share on other sites
radian = degree * pi / 180
degree = radian * 180 / pi

edit: all c function use radian.

[edited by - Wildfire on January 31, 2003 4:40:49 AM]

Share on other sites
Isn''t the function ''acos''?

Share on other sites
doesn't seem to work i'm using the cosine rule to to find a value then doing acos of that but it doen't work am i doing it right or horribly horribly wrong.

[edited by - hello_there on January 31, 2003 4:47:54 AM]

Share on other sites

    float	angle1 = 45; //degreesfloat	sine         //sinus;float	radians      //radians;float	angle2       //degrees;sine = sin(angle1 * 3.141/180); //convert to radians, c wants radians, not degrees	radians = asin(sine);           //c will return the angle in radiansangle2 = radians * 180 / 3.141; //reconvert to degrees

[edited by - Wildfire on January 31, 2003 4:54:56 AM]

Share on other sites
quote:
Original post by hello_there
what''s the function for inverse cosine?

You know, it would be helpful if you specified a language.

Share on other sites
i think i''ve stuffed up my previous calculations. cause it''s not working.

in C++

1. 1
2. 2
JoeJ
17
3. 3
4. 4
frob
11
5. 5

• 13
• 16
• 13
• 20
• 13
• Forum Statistics

• Total Topics
632185
• Total Posts
3004636

×