Changeset 16481 in webkit for trunk/JavaScriptCore/wtf/MathExtras.h
- Timestamp:
- Sep 20, 2006, 2:12:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/MathExtras.h
r16164 r16481 38 38 inline long lround(double num) { return num > 0 ? num + 0.5 : ceil(num - 0.5); } 39 39 inline long lroundf(float num) { return num > 0 ? num + 0.5f : ceilf(num - 0.5f); } 40 inline int lrint(float num) { return int(lroundf(num)); } 40 41 inline double round(double num) { return num > 0 ? floor(num + 0.5) : ceil(num - 0.5); } 41 42 inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); }
Note:
See TracChangeset
for help on using the changeset viewer.