alright, at first it didn't work.... But I made things a little different in order to get it working.
I wanted to spawn an actor at a position to the nearest multiple of 50 so that they snap to a grid. I was trying to spawn the actor at a rounded touch point, which wasn't working. I ended up just spawning the actor at the unrounded touch point and then inside the actor's attribute editor, rounding position.x and position.y.
Comments
If you replace floor with ceil that will round it up to the nearest multiple of 50.
If you put it in a rule that says if touch.y % 50 (you'll need to create a new attribute and calculate that) is greater than 25
change attribute to (ceil(touch.y/50))*50
OTHERWISE
change attribute to (floor(touch.y/50))*50
I think that should work, haven't tried it and it's early here so forgive me if it doesn't!
I wanted to spawn an actor at a position to the nearest multiple of 50 so that they snap to a grid. I was trying to spawn the actor at a rounded touch point, which wasn't working. I ended up just spawning the actor at the unrounded touch point and then inside the actor's attribute editor, rounding position.x and position.y.
Your math was correct RH, thank you.