• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Rounding float to make it divisible by specified value.
#4
Try this



stock GetGridValue(grid_size, Float:value)

{

new ivalue = floatround(value);

while (ivalue % grid_size != 0) (ivalue < 0) ? (飼�):(--ivalue);

return ivalue;

}
m e h
  Reply


Messages In This Thread
RE: Rounding float to make it divisible by specified value. - by blade - 2019-04-14, 11:08 PM

Forum Jump: