Pretty much the title, I'm pretty confused and the blender documentation doesn't help much : "Round the input value to down to the nearest integer multiple of Increment"


1 Answer 1


It does what it says on the tin.. :) .. it winds up being a staircase function:

enter image description here

.. with the rise and tread both being the 'Increment'. Here, shown with increments of 2, 1, and 2/3.

For any input X, the output will be X, rounded down to the nearest whole-number multiple of 'Increment'.

Thanks again to @Rich Sedman for this way of visualising functions..

enter image description here

Because of the great geometry nodes you can also watch easily the snap values with this node setup:

enter image description here

Just change the B-values and/or the x/y offset values and watch what happens.

As @batFINGER points out, in Python, it could be: increment * (x // increment)

  • $\begingroup$ So say for example for an increment of 1, X = 1. Will Snap(X) be 0 or 1? $\endgroup$ Aug 25, 2021 at 13:40
  • 2
    $\begingroup$ Look at the picture : offset is 1 - x is 1 - snapx is 0 so the answer is: it is 0 $\endgroup$
    – Chris
    Aug 25, 2021 at 13:50
  • $\begingroup$ It should be 1, bearing in mind, in floating-point world, you can't necessarily rely on there being any such thing as 1. $\endgroup$
    – Robin Betts
    Aug 25, 2021 at 13:53
  • 1
    $\begingroup$ Alright, im gonna have to digest this for a bit. Thank you for the answers. $\endgroup$ Aug 25, 2021 at 14:10
  • $\begingroup$ Robin, Scriptwise Is this n * (x // n) where n is the increment? $\endgroup$
    – batFINGER
    Aug 25, 2021 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .