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

Comparing ray/src/common/calfunc.c (file contents):
Revision 2.4 by greg, Thu May 21 10:29:32 1992 UTC vs.
Revision 2.5 by greg, Fri Oct 2 15:58:31 1992 UTC

# Line 20 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20  
21   #include  <errno.h>
22  
23 + #include  <math.h>
24 +
25   #include  "calcomp.h"
26  
27                                  /* bits in argument flag (better be right!) */
# Line 469 | Line 471 | l_select()             /* return argument #(A1+1) */
471   static double
472   l_rand()                /* random function between 0 and 1 */
473   {
472    extern double  floor();
474      double  x;
475  
476      x = argument(1);
# Line 483 | Line 484 | l_rand()               /* random function between 0 and 1 */
484   static double
485   l_floor()               /* return largest integer not greater than arg1 */
486   {
486    extern double  floor();
487
487      return(floor(argument(1)));
488   }
489  
# Line 492 | Line 491 | l_floor()              /* return largest integer not greater than
491   static double
492   l_ceil()                /* return smallest integer not less than arg1 */
493   {
495    extern double  ceil();
496
494      return(ceil(argument(1)));
495   }
496  
# Line 502 | Line 499 | l_ceil()               /* return smallest integer not less than arg
499   static double
500   l_sqrt()
501   {
505    extern double  sqrt();
506
502      return(sqrt(argument(1)));
503   }
504  
# Line 511 | Line 506 | l_sqrt()
506   static double
507   l_sin()
508   {
514    extern double  sin();
515
509      return(sin(argument(1)));
510   }
511  
# Line 520 | Line 513 | l_sin()
513   static double
514   l_cos()
515   {
523    extern double  cos();
524
516      return(cos(argument(1)));
517   }
518  
# Line 529 | Line 520 | l_cos()
520   static double
521   l_tan()
522   {
532    extern double  tan();
533
523      return(tan(argument(1)));
524   }
525  
# Line 538 | Line 527 | l_tan()
527   static double
528   l_asin()
529   {
541    extern double  asin();
542
530      return(asin(argument(1)));
531   }
532  
# Line 547 | Line 534 | l_asin()
534   static double
535   l_acos()
536   {
550    extern double  acos();
551
537      return(acos(argument(1)));
538   }
539  
# Line 556 | Line 541 | l_acos()
541   static double
542   l_atan()
543   {
559    extern double  atan();
560
544      return(atan(argument(1)));
545   }
546  
# Line 565 | Line 548 | l_atan()
548   static double
549   l_atan2()
550   {
568    extern double  atan2();
569
551      return(atan2(argument(1), argument(2)));
552   }
553  
# Line 574 | Line 555 | l_atan2()
555   static double
556   l_exp()
557   {
577    extern double  exp();
578
558      return(exp(argument(1)));
559   }
560  
# Line 583 | Line 562 | l_exp()
562   static double
563   l_log()
564   {
586    extern double  log();
587
565      return(log(argument(1)));
566   }
567  
# Line 592 | Line 569 | l_log()
569   static double
570   l_log10()
571   {
595    extern double  log10();
596
572      return(log10(argument(1)));
573   }
574   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines