MCPcopy Create free account
hub / github.com/mmcgrana/gobyexample / area

Method area

examples/interfaces/interfaces.go:37–39  ·  view source on GitHub ↗

The implementation for `circle`s.

()

Source from the content-addressed store, hash-verified

35
36// The implementation for `circle`s.
37func (c circle) area() float64 {
38 return math.Pi * c.radius * c.radius
39}
40func (c circle) perim() float64 {
41 return 2 * math.Pi * c.radius
42}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected