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"
It does what it says on the tin.. :) .. it winds up being a staircase function:
.. 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..
Because of the great geometry nodes you can also watch easily the snap values with this node setup:
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$– ChrisAug 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
nis the increment? $\endgroup$ Aug 25, 2021 at 14:19