simplify.py
simplify.py copied to clipboard
Wrong work if y data are equal
If we ran follow script
import simplify
print simplify.simplify_points([{'y': 0, 'x': 15}, {'y': 0.6, 'x': 16}, {'y': 0, 'x': 17}], 0.5)
we got:
[{'y': 0, 'x': 15}, {'y': 0.6, 'x': 16}, {'y': 0, 'x': 17}]
But this is wrong, we must get follow result:
[{'y': 0, 'x': 15}, {'y': 0, 'x': 17}]