Changeset 156 for libmpc/branches/r2d/include
- Timestamp:
- 12/09/06 22:45:39 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/include/mpc/mpcmath.h
r137 r156 17 17 */ 18 18 19 #include <mpc/mpc_types.h> 19 20 20 21 #ifndef M_PI … … 58 59 #define ATAN2F(x,y) ATAN2 (x,y) 59 60 #define IFLOORF(x) IFLOOR (x) 61 62 typedef union mpc_floatint 63 { 64 float f; 65 mpc_int32_t n; 66 } mpc_floatint; 67 68 static mpc_inline mpc_int32_t mpc_lrintf(float fVal) 69 { 70 mpc_floatint tmp; 71 tmp.f = fVal + 0x00FF8000; 72 return tmp.n - 0x4B7F8000; 73 } 74 75 static mpc_inline float mpc_nearbyintf(float fVal) 76 { 77 return (float) mpc_lrintf(fVal); 78 } 79
Note: See TracChangeset
for help on using the changeset viewer.