Consider a float value like 1.82 set by the user. How do I find the next highest .05 value? For the given example the next highest value is 1.85.
Is the
float fixedCeil(float num, float factor) { float steps = 1.0f / factor; return ceil(steps*num)/steps; } assert(fixedCeil(2.43f, 0.05f) == 2.45f);
(assert is just fictional)