function filter(number, increment)
number = math.ceil(number)
number = number - (number%increment)
return number
end
Increment = 1
I input the resulting number into this line:
initialPosVector = Vector3.new(filter(mouse.Hit.X,Increment), filter(mouse.Hit.Y, Increment), filter(mouse.Hit.Z,Increment))
So I found the function above that allows for block movement that responds to mouse input, to be incremented as presented in this video:
What I am looking for is an explanation as to why this function increments the block’s movement.
An example that led to me bringing up this question is this:
If:
number = 3.6
increment = 1
Then the equation would be:
filter(3.6, 1)
3.6 = math.ceil(3.6)
4 = 4 - (4/1) <---this ends up simplifying into 4 = 0 ?_?
So the result that is returned is 4 = 0 which is invalid…so I’m not quite sure how this equation increments movement.
I am simply looking for an explanation as why this works.