Module: Geometry::SlopedLine
- Included in:
- PointSlopeLine, SlopeInterceptLine
- Defined in:
- lib/geometry/line.rb
Instance Attribute Summary collapse
- #horizontal? ⇒ Boolean
-
#slope ⇒ Object
Returns the value of attribute slope.
- #vertical? ⇒ Boolean
Instance Attribute Details
#horizontal? ⇒ Boolean
104 105 106 |
# File 'lib/geometry/line.rb', line 104 def horizontal? slope.zero? end |
#slope ⇒ Object
Returns the value of attribute slope.
100 101 102 |
# File 'lib/geometry/line.rb', line 100 def slope @slope end |
#vertical? ⇒ Boolean
110 111 112 113 114 |
# File 'lib/geometry/line.rb', line 110 def vertical? slope.infinite? != nil rescue # Non-Float's don't have an infinite? method false end |