Define a [public] function called "isEquilateral" which will return true if all of this polygon's sides are of equal length (otherwise it'll return false). Make sure that this function works no matter how many sides / vertices there are. I have a distance function in another class. that handles the distance between two points. Vertices is an array of points.
Aucun commentaire:
Enregistrer un commentaire