Original Post
It is used in a projection transformation ( spherical)
What are you think about this approximation ?
(Here is without sign respect.)
double norm_atan( double M)
{// very close to line curve
return atan2( M , (1.0 - M ) );
}
double norm_atan_appx( double t )
{// polinomial approximation
return ((- 1.618679f*t + 2.428018f)*t + 0.761457f)*t;
// return (((0.000004f*t - 1.513571f)*t + 2.270356f)*t + 0.814012f)*t;
// return (((2.982346f*t - 7.456024f)*t + 5.000778f)*t - 0.045103f)*t + 1.088759f)*t;
}
double appx_atan2( double A, double B )
{
//return norm_atan( A/(A + B) ); //
return norm_atan_appx( A/(A + B) );
}