Taking the maximum angle in anglesSamples and limiting angles to 90