o

package
v0.0.0-...-3facaca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2020 License: CC0-1.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeArea

func ComputeArea(shapes []interface{}) (totalArea float64)

func ComputeAreaBetter

func ComputeAreaBetter(shapes []Shape) (totalArea float64)

Types

type Circle

type Circle struct {
	Radius int
}

func (Circle) Area

func (c Circle) Area() float64

type Rectangle

type Rectangle struct {
	Width  int
	Height int
}

func (Rectangle) Area

func (r Rectangle) Area() float64

type Shape

type Shape interface {
	Area() float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL