add comments

This commit is contained in:
filifa
2025-09-30 23:58:28 -04:00
parent 5c42040e34
commit a760093f9d
12 changed files with 62 additions and 3 deletions

View File

@@ -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)