Algorithm for snap to tick is ready.