project_files/hwc/rtl/pmath.h
branchwebgl
changeset 7983 02f36c3e7f6c
child 8047 25a4daa6473c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/hwc/rtl/pmath.h	Wed Nov 07 18:04:27 2012 +0000
@@ -0,0 +1,23 @@
+#ifndef PMATH_H_
+#define PMATH_H_
+
+#include <stdint.h>
+
+#define     fpcrtl_min(a, b)                ((a) < (b) ? (a) : (b))
+#define     fpcrtl_max(a, b)                ((a) > (b) ? (a) : (b))
+
+float       fpcrtl_power(float base, float exponent);
+
+/* Currently the games only uses sign of an integer */
+int         fpcrtl_signi(int x);
+
+float       fpcrtl_csc(float x);
+
+#define     fpcrtl_arctan2(y, x)            atan2(y, x)
+
+float       __attribute__((overloadable))   fpcrtl_abs(float x);
+double      __attribute__((overloadable))   fpcrtl_abs(double x);
+int         __attribute__((overloadable))   fpcrtl_abs(int x);
+int64_t     __attribute__((overloadable))   fpcrtl_abs(int64_t x);
+
+#endif /* PMATH_H_ */