Ignore:
Timestamp:
Sep 20, 2006, 2:12:01 PM (19 years ago)
Author:
hyatt
Message:

Add an implementation of lrint for Win32.

Reviewed by anders

  • wtf/MathExtras.h: (lrint):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r16164 r16481  
    3838inline long lround(double num) { return num > 0 ? num + 0.5 : ceil(num - 0.5); }
    3939inline long lroundf(float num) { return num > 0 ? num + 0.5f : ceilf(num - 0.5f); }
     40inline int lrint(float num) { return int(lroundf(num)); }
    4041inline double round(double num) { return num > 0 ? floor(num + 0.5) : ceil(num - 0.5); }
    4142inline 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.