Class: VectorSalad::StandardShapes::Triangle

Inherits:
Polygon show all
Defined in:
lib/vector_salad/standard_shapes/triangle.rb

Overview

Equilateral triangle shape.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Triangle) initialize(radius, **options)

Create a new equilateral triangle.

Examples:

new(100)


11
12
13
# File 'lib/vector_salad/standard_shapes/triangle.rb', line 11

def initialize(radius, **options)
  super(3, radius, **options)
end

Instance Attribute Details

- (Object) options Originally defined in class BasicShape

Returns the value of attribute options

- (Object) sides (readonly) Originally defined in class Polygon

Returns the value of attribute sides