News for hackers. Stuff that matters.
Re:The trouble with 'floor' and 'ceil' by yoklov on Thursday January 07, 2016 @02:05AM (#10856468)
This is just sweeping the problem under the rug. Round would probably be a better choice for them, but it wouldn't solve the problem, since you can't get rid of that discontinuity.

Generally a good rule of thumb is that unless you are certain you need floor or ceil, use round.

Re:The trouble with 'floor' and 'ceil' by mortoray on Thursday January 07, 2016 @02:33AM (#10856539)
Yes, round is usually a safer choice, but in this case we had reasons to use floor and ceil, and thus had to deal with the issue.

I've added a section to the article with a more correct snapping function showing the issue more clearly (I hope).