add comments
This commit is contained in:
@@ -21,6 +21,9 @@ type Point struct {
|
||||
Y float64
|
||||
}
|
||||
|
||||
/*
|
||||
Area computes the area of a polygon given its vertices using the shoelace formula.
|
||||
*/
|
||||
func Area(points []Point) float64 {
|
||||
total := float64(0)
|
||||
n := len(points)
|
||||
|
||||
Reference in New Issue
Block a user