|Sin, Cos, Tan approximation|
References : http://www.wild-magic.com
Linked file : approx.h
Code for approximation of cos, sin, tan and inv sin, etc.
Surprisingly accurate and very usable.
[edit by bram]
this code is taken literaly from
Go have a look at the MgcMath.h and MgcMath.cpp files in their library...
Added on : 31/08/02 by asynth[ AT ]io[ DOT ]com
It'd be nice to have a note on the domain of these functions. I assume Sin0 is meant to be used about zero and Sin1 about 1. But a note to that effect would be good.
Added on : 31/05/03 by mcodespam[ AT ]gmx[ DOT ]net
Sin0 is faster but less accurate than Sin1, same for the other pairs. The domains are:
Sin/Cos [0, pi/2]
InvSin/Cos [0, 1]
InvTan [-1, 1]
This comes from the original header file.
|Add your own comment|
Comments are displayed in fixed width, no HTML code allowed!