gg/cmd/math/main.go
2023-10-23 15:47:27 +03:00

19 lines
284 B
Go

package main
import (
"github.com/reklesio/gg/src/gx"
"fmt"
)
func main() {
p := gx.Polygon{
gx.Vertex{0, 0},
gx.Vertex{0, 50},
gx.Vertex{25, 50},
gx.Vertex{30, 40},
gx.Vertex{40, 30},
}
fmt.Println("barycenter:", p.Barycenter())
fmt.Println("edges:", p.Edges())
}