I'm working through Stroustrup's PPP, on the graphics chapter 12, exercise 12 I need to draw a superellipse. Using, the maths function from Wikipedia I can almost get this working. When the n value is 2, it draws a circle, which it should. But, when I have an n value of 4, instead of drawing a square with rounded corners I get a square with sharp corners. Can anyone spot any problems with what I'm doing?