ShapeConstructor

Constructors for Shape algebra

class Object
trait Matchable
class Any
BaseConstructor { type Algebra <: ([x[_]] =>> Shape[x]); }

Value members

Concrete methods

def circle(diameter: Double): <none>[Unit]

A circle with the given diameter. We use diamter rather than radius so circle(100) has the same size as square(100)

A circle with the given diameter. We use diamter rather than radius so circle(100) has the same size as square(100)

def empty: <none>[Unit]

The empty shape, which is no shape at all.

The empty shape, which is no shape at all.

def rectangle(width: Double, height: Double): <none>[Unit]

A rectangle with the given width and height.

A rectangle with the given width and height.

def square(width: Double): <none>[Unit]

A square with the given side length.

A square with the given side length.

def triangle(width: Double, height: Double): <none>[Unit]

An isoceles triangle with the given width and height.

An isoceles triangle with the given width and height.