Changeset 15155 in webkit for trunk/JavaScriptCore/wtf
- Timestamp:
- Jul 4, 2006, 9:13:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/MathExtras.h
r14728 r15155 30 30 #include <xmath.h> 31 31 32 inline bool isinf(double num) { return !_finite(num); } 32 #if HAVE(FLOAT_H) 33 #include <float.h> 34 #endif 35 36 inline bool isinf(double num) { return !_finite(num) && !_isnan(num); } 33 37 inline bool isnan(double num) { return _isnan(num); } 34 38 inline long lround(double num) { return num > 0 ? num + 0.5 : ceil(num - 0.5); } … … 38 42 inline bool signbit(double num) { return _copysign(1.0, num) < 0; } 39 43 44 #if PLATFORM(WIN) && COMPILER(MSVC) 45 46 // Work around a bug in the Microsoft CRT, where fmod(x, +-infinity) yields NaN instead of x. 47 inline double wtf_fmod(double x, double y) { return (!isinf(x) && isinf(y)) ? x : fmod(x, y); } 48 49 #define fmod(x, y) wtf_fmod(x, y) 50 40 51 #endif
Note:
See TracChangeset
for help on using the changeset viewer.