Changeset 8180d8 for src/base/helper.hpp
- Timestamp:
- Apr 5, 2013, 12:39:30 PM (13 years ago)
- Children:
- 4a709e
- Parents:
- f57182
- File:
-
- 1 edited
-
src/base/helper.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/base/helper.hpp
rf57182 r8180d8 30 30 31 31 #include <cassert> 32 #include <cmath> 32 33 #include <cstdio> 33 34 #include <limits> … … 161 162 } 162 163 164 inline int RoundUpToNextMultiple(int number, int multiple) 165 { 166 return static_cast<int>(ceil((static_cast<vmg_float>(number)-0.5) / multiple)) * multiple; 167 } 168 169 inline int RoundDownToNextMultiple(int number, int multiple) 170 { 171 return static_cast<int>(floor((static_cast<vmg_float>(number)+0.5) / multiple)) * multiple; 172 } 173 163 174 164 175 /**
Note:
See TracChangeset
for help on using the changeset viewer.
