MCPcopy Create free account
hub / github.com/fogleman/primitive / Copy

Method Copy

primitive/polygon.go:54–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (p *Polygon) Copy() Shape {
55 a := *p
56 a.X = make([]float64, p.Order)
57 a.Y = make([]float64, p.Order)
58 copy(a.X, p.X)
59 copy(a.Y, p.Y)
60 return &a
61}
62
63func (p *Polygon) Mutate() {
64 const m = 16

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected