tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / preferences / screen / Utility.cpp
blob0d20599a1e878349ddc18394bb180cc83c70a85d
1 #include "Utility.h"
2 #include <math.h>
4 float round(float n, int32 max)
5 {
6 max = (int32)pow(10, (float)max);
8 n *= max;
9 n += 0.5;
11 int32 tmp = (int32)floor(n);
12 return (float)tmp / (max);