add warning to round
parent
c025299ee4
commit
d50e13dcb6
|
@ -19,6 +19,12 @@ namespace blt::string {
|
||||||
return collection;
|
return collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a fast rounding function and is not guaranteed to be 100% correct
|
||||||
|
* @tparam decimal_places
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
template<int decimal_places>
|
template<int decimal_places>
|
||||||
static inline double round_up(double value) {
|
static inline double round_up(double value) {
|
||||||
constexpr double multiplier = _static_pow(decimal_places);
|
constexpr double multiplier = _static_pow(decimal_places);
|
||||||
|
|
Loading…
Reference in New Issue