Class: DouglasPeucker::OrthogonalDistance
- Inherits:
-
Struct
- Object
- Struct
- DouglasPeucker::OrthogonalDistance
- Defined in:
- lib/douglas_peucker/orthogonal_distance.rb
Overview
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
-
#point ⇒ Object
Returns the value of attribute point.
Instance Method Summary collapse
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line
3 4 5 |
# File 'lib/douglas_peucker/orthogonal_distance.rb', line 3 def line @line end |
#point ⇒ Object
Returns the value of attribute point
3 4 5 |
# File 'lib/douglas_peucker/orthogonal_distance.rb', line 3 def point @point end |
Instance Method Details
#distance ⇒ Object
4 5 6 |
# File 'lib/douglas_peucker/orthogonal_distance.rb', line 4 def distance numerator.abs/denominator**0.5 end |