Advertisement

arcsin and arccos??

Started by September 10, 2000 11:12 AM
1 comment, last by Strylinys 24 years, 2 months ago
Are there such functions in vc++6 that perform the same operation as arcsin and arccos? (these two are used to find the angle from the coords of a point on a circle) Just thought it might be easier if there were functions for inverse sin and cos so that i don''t have to make a huge table of values with my calculator then plug them into my proggie... S.
yeah, asin and acos
Advertisement
Hi, how precise are the angles you are calculating?

Almost always, it is better to pre generate those kinds of values into a lookup table, as its much faster than calculating them on the fly.

You wouldnt need to type them in by hand with a calculator either.

Just write a bit of code at the start of your program to calculate the angle results for every angle you need and store it into the lookup table (which can simply be an array of floats/ints).

The speed increase is well worth the effort. Maybe it doesn''t apply to your application if you need a great deal of precision, but just some constructive thought

Cel
Cel aka Razehttp://chopper2k.qgl.org

This topic is closed to new replies.

Advertisement