Loading icosahedron/icosahedron.go +16 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,22 @@ type Icosahedron struct { fs Faces } // Level returns the number of the subdivisions done. // Level() == 0 is the basic icosahedron. func (i *Icosahedron) Level() int { return i.level } // Vertices returns the veritces of the icosahedron. func (i *Icosahedron) Vertices() Vertices { return i.vs } // Faces returns the faces of the icosahedron. func (i *Icosahedron) Faces() Faces { return i.fs } // Create creates the vertices and faces for a regular icosahedron. func Create() (*Icosahedron, error) { vertices := Vertices{ Loading Loading
icosahedron/icosahedron.go +16 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,22 @@ type Icosahedron struct { fs Faces } // Level returns the number of the subdivisions done. // Level() == 0 is the basic icosahedron. func (i *Icosahedron) Level() int { return i.level } // Vertices returns the veritces of the icosahedron. func (i *Icosahedron) Vertices() Vertices { return i.vs } // Faces returns the faces of the icosahedron. func (i *Icosahedron) Faces() Faces { return i.fs } // Create creates the vertices and faces for a regular icosahedron. func Create() (*Icosahedron, error) { vertices := Vertices{ Loading