Changeset 14728 in webkit for trunk/JavaScriptCore/wtf/MathExtras.h
- Timestamp:
- Jun 4, 2006, 3:51:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/MathExtras.h
r14522 r14728 28 28 #if PLATFORM(WIN) 29 29 30 inline float roundf(float num) 31 { 32 return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); 33 } 30 #include <xmath.h> 34 31 35 inline long lroundf(float num) 36 { 37 return num > 0 ? num + 0.5f : ceilf(num - 0.5f); 38 } 32 inline bool isinf(double num) { return !_finite(num); } 33 inline bool isnan(double num) { return _isnan(num); } 34 inline long lround(double num) { return num > 0 ? num + 0.5 : ceil(num - 0.5); } 35 inline long lroundf(float num) { return num > 0 ? num + 0.5f : ceilf(num - 0.5f); } 36 inline double round(double num) { return num > 0 ? floor(num + 0.5) : ceil(num - 0.5); } 37 inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); } 38 inline bool signbit(double num) { return _copysign(1.0, num) < 0; } 39 39 40 40 #endif
Note:
See TracChangeset
for help on using the changeset viewer.