Class: DouglasPeucker::LineSimplifier
- Inherits:
-
Object
- Object
- DouglasPeucker::LineSimplifier
- Defined in:
- lib/douglas_peucker/line_simplifier.rb
Instance Method Summary collapse
-
#initialize(points) ⇒ LineSimplifier
constructor
A new instance of LineSimplifier.
- #points ⇒ Object
- #threshold(threshold) ⇒ Object
Constructor Details
#initialize(points) ⇒ LineSimplifier
Returns a new instance of LineSimplifier.
4 5 6 7 |
# File 'lib/douglas_peucker/line_simplifier.rb', line 4 def initialize(points) @points = points @threshold = 10e-8 end |
Instance Method Details
#points ⇒ Object
14 15 16 |
# File 'lib/douglas_peucker/line_simplifier.rb', line 14 def points calculate_points(@points) end |
#threshold(threshold) ⇒ Object
9 10 11 12 |
# File 'lib/douglas_peucker/line_simplifier.rb', line 9 def threshold(threshold) @threshold = threshold self end |