Class: Geometry::PointSlopeLine
Instance Method Summary collapse
-
#initialize(point, slope) ⇒ PointSlopeLine
constructor
A new instance of PointSlopeLine.
- #to_s ⇒ Object
Methods inherited from Line
[], horizontal, new, vertical
Methods included from ClusterFactory
Constructor Details
#initialize(point, slope) ⇒ PointSlopeLine
Returns a new instance of PointSlopeLine.
90 91 92 93 |
# File 'lib/geometry/line.rb', line 90 def initialize(point, slope) @point = Point[point] @slope = slope end |
Instance Method Details
#to_s ⇒ Object
94 95 96 |
# File 'lib/geometry/line.rb', line 94 def to_s 'Line(' + @slope.to_s + ',' + @point.to_s + ')' end |