mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] Update the comparison implementation in voronoi.py (fixes #18219)
When "translating" the cmp function of Site and Halfedge to Python 3, the __lt__ function was forgotten. It has been added.
This commit is contained in:
parent
8700037725
commit
ca0017410b
6
python/plugins/processing/algs/qgis/voronoi.py
Normal file → Executable file
6
python/plugins/processing/algs/qgis/voronoi.py
Normal file → Executable file
@ -397,7 +397,7 @@ class Site(object):
|
||||
return False
|
||||
elif self.x < other.x:
|
||||
return True
|
||||
elif self.x > other.x:
|
||||
else:
|
||||
return False
|
||||
|
||||
def distance(self, other):
|
||||
@ -512,7 +512,7 @@ class Halfedge(object):
|
||||
return False
|
||||
elif self.vertex.x < other.vertex.x:
|
||||
return True
|
||||
elif self.vertex.x > other.vertex.x:
|
||||
else:
|
||||
return False
|
||||
|
||||
def leftreg(self, default):
|
||||
@ -905,4 +905,4 @@ def cmp(a, b):
|
||||
|
||||
In python 2 cmp() was a built in function but in python 3 is gone.
|
||||
"""
|
||||
return (a > b) - (a < b)
|
||||
return (b < a) - (a < b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user