ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tcos.c
(Generate patch)

Comparing ray/src/common/tcos.c (file contents):
Revision 3.8 by greg, Fri Feb 8 16:10:07 2013 UTC vs.
Revision 3.10 by greg, Fri Jul 12 05:16:02 2013 UTC

# Line 18 | Line 18 | static const char      RCSid[] = "$Id$";
18  
19   #include "rtmath.h"
20  
21 + #ifndef __FAST_MATH__
22 +
23   #ifndef NCOSENTRY
24   #define NCOSENTRY       1024
25   #endif
26  
25
27   double
28   tcos(double x)                          /* approximate cosine */
29   {
# Line 51 | Line 52 | tcos(double x)                         /* approximate cosine */
52          return(0.);             /* should never be reached */
53   }
54  
55 + #endif
56  
57   /* Fast arctangent approximation due to Rajan et al. 2006 */
58   double
# Line 64 | Line 66 | atan2a(double y, double x)
66          aratio = (ratio = y/x) >= 0 ? ratio : -ratio;
67  
68          if (aratio > 1.01)
69 <                return PI/2. - aatan2(x, y);
69 >                return PI/2. - atan2a(x, y);
70  
71          val = PI/4.*ratio - ratio*(aratio - 1.)*(0.2447 + 0.0663*aratio);
72  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines