Class: Geometry::ScaleneTriangle

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Triangle

new

Methods included from ClusterFactory

included

Constructor Details

#initialize(point0, point1, point2) ⇒ ScaleneTriangle

Construct a scalene Triangle



74
75
76
# File 'lib/geometry/triangle.rb', line 74

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.



71
72
73
# File 'lib/geometry/triangle.rb', line 71

def points
  @points
end