project_files/hwc/rtl/pmath.h
branchwebgl
changeset 7983 02f36c3e7f6c
child 8047 25a4daa6473c
equal deleted inserted replaced
7981:aac257b77842 7983:02f36c3e7f6c
       
     1 #ifndef PMATH_H_
       
     2 #define PMATH_H_
       
     3 
       
     4 #include <stdint.h>
       
     5 
       
     6 #define     fpcrtl_min(a, b)                ((a) < (b) ? (a) : (b))
       
     7 #define     fpcrtl_max(a, b)                ((a) > (b) ? (a) : (b))
       
     8 
       
     9 float       fpcrtl_power(float base, float exponent);
       
    10 
       
    11 /* Currently the games only uses sign of an integer */
       
    12 int         fpcrtl_signi(int x);
       
    13 
       
    14 float       fpcrtl_csc(float x);
       
    15 
       
    16 #define     fpcrtl_arctan2(y, x)            atan2(y, x)
       
    17 
       
    18 float       __attribute__((overloadable))   fpcrtl_abs(float x);
       
    19 double      __attribute__((overloadable))   fpcrtl_abs(double x);
       
    20 int         __attribute__((overloadable))   fpcrtl_abs(int x);
       
    21 int64_t     __attribute__((overloadable))   fpcrtl_abs(int64_t x);
       
    22 
       
    23 #endif /* PMATH_H_ */