Class: Geometry::ScaleneTriangle
- Defined in:
- lib/geometry/triangle.rb
Instance Attribute Summary collapse
-
#points ⇒ Object
readonly
Returns the value of attribute points.
Attributes inherited from Triangle
Instance Method Summary collapse
-
#initialize(point0, point1, point2) ⇒ ScaleneTriangle
constructor
Construct a scalene Triangle.
Methods inherited from Triangle
Methods included from ClusterFactory
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
#points ⇒ Object (readonly)
Returns the value of attribute points.
92 93 94 |
# File 'lib/geometry/triangle.rb', line 92 def points @points end |