Is there any way that I can get the sin(), cos() and tan() functions to return an angle? For example, like when you press 2nd then sin on a calculator. Or should I use different functions?
chrishtones
0
Newbie Poster
Recommended Answers
Jump to PostHard time converting radians to angles?
Jump to Posti belive what you are looking to use are the acos(), asin(), and atan() functions.
for instance: tan() returns the ratio of the sides (y/x or opposite/adjacent) when given the angle in radians as the argument .... …
Jump to Postsorry, i made a typing mistake .. in C/C++ the functions are actually called as "asin()", "acos()" and "atan()"
follow the links i provided above and you'll see the prototypes.
the header is still the same <math.h> (aka <cmath>)
.
Jump to PostCant you just convert the radians to degrees?
All 13 Replies
Lerner
582
Nearly a Posting Maven
jephthah
commented:
lol
+12
chrishtones
0
Newbie Poster
bnekolny
0
Newbie Poster
jephthah
1,888
Posting Maven
chrishtones
0
Newbie Poster
chrishtones
0
Newbie Poster
chrishtones
0
Newbie Poster
jephthah
1,888
Posting Maven
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
jephthah
1,888
Posting Maven
mvmalderen
2,072
Postaholic
siddhant3s
1,429
Practically a Posting Shark
mvmalderen
2,072
Postaholic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.