shapes

The shape module

Types

Some shapes

pub type Shape {
  Rectangle(width: Int, height: Int)
  Circle(radius: Int)
  Square(Float)
}

Constructors

  • Rectangle(width: Int, height: Int)
  • Circle(radius: Int)
  • Square(Float)

Functions

pub fn shape_info(box: Shape) -> String

A function that take a shape, and returns some info about it.

Search Document