Constrain x, y, and magnitude values.