Clamp input position SnapToNearestBoundary.