# Weird angles

I was making an applet to add up exterior angles for a polygon (first draft https://www.geogebra.org/m/hs4seyav) and ran into a couple of weird angle measurement issues.

I made up an exterior angle tool, then use that to get all the angles into a list l2t. Some measure > 180deg so I then made a copied list changing those values.

Sequence(If(Element(l2t, i) > 180°, Element(l2t, i) - 360°, Element(l2t, i)), i, 1, n)

and it returned the same list! When I tried on a secific angle, like If(Element(l2t, 3) > 180°, Element(l2t, 3) - 360°, Element(l2t, 3)) it worked. So I tried a couple computational things to see if that would make a difference and suddenly the list was rendered in radians, accurately. Now nothing I do can convert it back to degrees.

So my main question is, what is going on with the angles here!? Not worried about the applet, since the radians list worked, and I can sum that and convert it for the text output.

Salut goldenj!

I'm not sure if I understand your problem right, but I only get degrees and no radians in your list l2t, but radians in l2t' and that's caused by the use of 2π instead of 360° in your definition:

l2t' = Sequence(If(Element(l2t, i) > 180°, Element(l2t, i) - 2π, Element(l2t, i)), i, 1, n)

Greetings

mire2

Thanks! I changed it to that from -360deg after the list started showing itself in radians anyway. Then it worked, and I got the expected responses and just converted it back to degrees for the text.

But the behavior of the angles was so mysterious. The original

l2t' = Sequence(If(Element(l2t, i) > 180°, Element(l2t, i) - 360°, Element(l2t, i)), i, 1, n)

would leave the original list unchanged, even for the angles >180. I know technically angle-360deg is the same angle, but was surprised GGB didn't record it as negative.

Loading...Comments have been locked on this page!