Not trying to be argumentative, but I'd like more answers please.
I'm sorry about the small size comment, I was thinking of previous examples where I had the size at 500.
And why is the polygon cast incorrect in this instance? Note that I only put it there to
test how many points there were, and is not a permanent feature, it would be removed.
Why would an if-else work better? I mean, not only does the try-catch solve the problem of creating a circle vs a polygon, it also handles when the user puts in less then 3 sides.
And my math at this point? I am trying to find the center, assuming that the shape has be circumscribed around the shape I am attempting to create. As such I use the distance formula. That will give me the diameter of the circle....and since I know the size, I just realized that using all that math is such a waste and the center is just (size/2, size/2).
And yes, it should be double i not int i...
And, Campbell Ritchie is right, Math.sin() and Math.cos() take the degree measurement in
radians not as degrees as I was putting them in.
That fixes my problem, however I would still like some answers to my previous questions.
Thanks guys!