• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Rounding float to make it divisible by specified value.
#5
Sorry, I'm trying to wrap my head around this whole grid thing, heck, I'm not even sure what I exactly 'need' to have this working.
I drew an image to show what I have in mind.
[Image: jEz0ppC.png]
With the player's position being:?-508.0857,-967.1429
I would need a function that rounds x to be divisible by 1.75 (Right?)
And another function that rounds y to be divisible by 1.606.
The outcome of the rounded x & y axis would be the center of the nearest grid, right?
  Reply


Messages In This Thread
RE: Rounding float to make it divisible by specified value. - by Xray - 2019-04-15, 12:16 AM

Forum Jump: