Sometimes the Math.atan_deg function outputs NaN.
Sometimes the Math.atan_deg function outputs NaN.