Hello, the problem is mainly in the title, but I do have a starting point:
math.ceil(number/multiple-0.5)*multiple
Heres an example:
Min: 12
Max: 100
Multiple: 25
The problem with the math.ceil I sent, is that it can round above or below the min/max. I know this can done in one line, so I’m trying to keep it there.
math.clamp(math.floor(x / factor) * factor, min, max)
Well, lets say the number is 27, I need it to round to 37 instead, since its closer to that multiple. Basically offset from the min, not 0. It should be able to round to the min, or round to the max.
math.clamp(math.round(x / factor) * factor, min, max)
or
math.clamp(math.floor(x / factor + 0.5) * factor, min, max)