Overte C++ Documentation
MathUtils.h
1 //
2 // MathUtils.h
3 // libraries/shared/src
4 //
5 // Created by Olivier Prat on 9/21/18.
6 // Copyright 2018 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_MathUtils_h
13 #define hifi_MathUtils_h
14 
15 template <class T>
16 T divideRoundUp(const T& numerator, int divisor) {
17  return (numerator + divisor - T(1)) / divisor;
18 }
19 
20 #endif // hifi_MathUtils_h
21