def sample_normal(x, y)
      gradient_x, gradient_y = sample_gradient x, y
      length = Gosu::distance 0, 0, gradient_x, gradient_y
      if length == 0
        [0, 0] # This could be NaN in edge cases.
      else
        [gradient_x / length, gradient_y / length]
      end
    end
def sample_normal(x, y)
      gradient_x, gradient_y = sample_gradient x, y
      length = Gosu::distance 0, 0, gradient_x, gradient_y
      if length == 0
        [0, 0] # This could be NaN in edge cases.
      else
        [gradient_x / length, gradient_y / length]
      end
    end
Get the normal at a given point.
 @return [Float, Float] normal_x, normal_y