About program
Use C++ to calculate area using shoelace formula.
Usage
To calculate area you need to change the variable number_of_polygon to the number of polygon your shape has. And change the coordinates array to the coordinate of each vertices of your shape. You need to list it in counter-clockwise position, and don't forget to add the first vertex to the back of the array to create a loop.
No comments:
Post a Comment