C++ help with math library
Moderator: Thanas
- Sarevok
- The Fearless One
- Posts: 10681
- Joined: 2002-12-24 07:29am
- Location: The Covenants last and final line of defense
C++ help with math library
I can not seem to find a C++ function for inverse of sin, cosine and tan in the standard math library. Is there any libraries available on the web which provide such functions ?
- InnocentBystander
- The Russian Circus
- Posts: 3466
- Joined: 2004-04-10 06:05am
- Location: Just across the mighty Hudson
You sure? http://www.cplusplus.com/ref/cmath/
The values are returned in radians though, so you'll have to multiply by 180/pi .
ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer
George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
- Dooey Jo
- Sith Devotee
- Posts: 3127
- Joined: 2002-08-09 01:09pm
- Location: The land beyond the forest; Sweden.
- Contact:
If you have trouble remembering the names for the inverse trigonometric functions in C/C++, you could try to learn the classic names for those functions, which are arcsine, arccosine and so on. That way, the names "atan" and "asin" actually makes some sense, which should make them easier to remember...
"Nippon ichi, bitches! Boing-boing."
Mai smote the demonic fires of heck...
Faker Ninjas invented ninjitsu
Mai smote the demonic fires of heck...
Faker Ninjas invented ninjitsu
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
Re: C++ help with math library
Use cmath.The Shadow wrote:I can not seem to find a C++ function for inverse of sin, cosine and tan in the standard math library. Is there any libraries available on the web which provide such functions ?
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
- Sarevok
- The Fearless One
- Posts: 10681
- Joined: 2002-12-24 07:29am
- Location: The Covenants last and final line of defense
Arcsine, arccosine and arctangent are still couple of months away from being taught at school. So I never realised the answer was right below my nose ! I wrote a sample program using atan and it worked exactly as I wanted. Thanks !Dooey Jo wrote:If you have trouble remembering the names for the inverse trigonometric functions in C/C++, you could try to learn the classic names for those functions, which are arcsine, arccosine and so on. That way, the names "atan" and "asin" actually makes some sense, which should make them easier to remember...