Advertisement
Guest User

math_snap

a guest
Jun 23rd, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @desc math_snap()
  2. /// @arg real_value
  3. /// @arg snap_value
  4.  
  5. /*
  6.     Takes a value and snaps it to a grid position.
  7.     Divide, floor, and multiply to snap.
  8. */
  9.  
  10. return floor(argument0 / argument1) * argument1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement