Class: Geometry::ScaleneTriangle

Inherits:
Triangle
  • Object
show all
Defined in:
lib/geometry/triangle.rb

Instance Attribute Summary collapse

Attributes inherited from Triangle

#closed?

Instance Method Summary collapse

Methods inherited from Triangle

#max, #min, #minmax, new

Methods included from ClusterFactory

included

Constructor Details

#initialize(point0, point1, point2) ⇒ ScaleneTriangle

Construct a scalene Triangle



95
96
97
# File 'lib/geometry/triangle.rb', line 95

def initialize(point0, point1, point2)
    @points = [point0, point1, point2].map {|p| Point[p] }
end

Instance Attribute Details

#pointsObject (readonly)

Returns the value of attribute points.



92
93
94
# File 'lib/geometry/triangle.rb', line 92

def points
  @points
end