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

Comparing ray/src/cal/tabfunc.c (file contents):
Revision 1.7 by greg, Sun Aug 11 17:04:09 2019 UTC vs.
Revision 1.9 by greg, Mon Jun 29 21:25:36 2020 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7   *      2/2/95  Greg Ward
8   */
9  
10 #include <stdio.h>
10   #include <stdlib.h>
12 #include <string.h>
11   #include <math.h>
12   #include <ctype.h>
15 #include <sys/types.h>
13  
14   #include "rtprocess.h" /* getpid() */
15   #include "rtmath.h"
# Line 160 | Line 157 | absc_exp(void)                 /* produce expression for abscissa */
157                  putlist(abscissa, tabsize, 20);
158                  puts(");");
159                  if (increasing) {
160 +                        printf("fx2`%s(x,i):if(x-X`%s(i),\n", locID, locID);
161                          printf("fx`%s(x):if(x-%g,if(%g-x,fx2`%s(x,%d),%d),1);\n",
162                                          locID, abscissa[0], abscissa[tabsize-1],
163                                          locID, tabsize, tabsize);
166                        printf("fx2`%s(x,i):if(x-X`%s(i),\n", locID, locID);
164                  } else {
165 +                        printf("fx2`%s(x,i):if(X`%s(i)-x,\n", locID, locID);
166                          printf("fx`%s(x):if(%g-x,if(x-%g,fx2`%s(x,%d),%d),1);\n",
167                                          locID, abscissa[0], abscissa[tabsize-1],
168                                          locID, tabsize, tabsize);
171                        printf("fx2`%s(x,i):if(X`%s(i)-x,\n", locID, locID);
169                  }
170                  printf("\ti+(x-X`%s(i))/(X`%s(i+1)-X`%s(i)),\n",
171                                  locID, locID, locID);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines