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

Comparing ray/src/common/fvect.c (file contents):
Revision 2.18 by greg, Wed Apr 3 00:22:12 2013 UTC vs.
Revision 2.19 by greg, Sat Jun 29 21:03:44 2013 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 + #define _USE_MATH_DEFINES
11   #include  <math.h>
12   #include  "fvect.h"
13  
14 + double
15 + Acos(double x)                  /* insurance for touchy math library */
16 + {
17 +        if (x <= -1.+FTINY*FTINY)
18 +                return(M_PI);
19 +        if (x >= 1.-FTINY*FTINY)
20 +                return(.0);
21 +        return(acos(x));
22 + }
23 +
24 + double
25 + Asin(double x)                  /* insurance for touchy math library */
26 + {
27 +        if (x <= -1.+FTINY*FTINY)
28 +                return(-M_PI/2.);
29 +        if (x >= 1.-FTINY*FTINY)
30 +                return(M_PI/2);
31 +        return(asin(x));
32 + }
33  
34   double
35   fdot(                           /* return the dot product of two vectors */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines