Changeset 2155 for code/branches/objecthierarchy/src/util
- Timestamp:
- Nov 8, 2008, 5:13:18 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/util
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/util/Math.h
r2114 r2155 39 39 #include <ostream> 40 40 #include <string> 41 #include <cmath> 41 42 #include <boost/static_assert.hpp> 42 43 … … 145 146 { 146 147 return x*x*x; 147 }148 149 /**150 @brief Rounds the value down.151 */152 template <typename T>153 inline int floor(T x)154 {155 return (int)(x);156 }157 158 /**159 @brief Rounds the value up.160 */161 template <typename T>162 inline int ceil(T x)163 {164 int temp = floor(x);165 return (temp != x) ? (temp + 1) : temp;166 148 } 167 149
Note: See TracChangeset
for help on using the changeset viewer.