Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add cmp() function
  • Loading branch information
marioba authored and m-kuhn committed Aug 7, 2017
1 parent b32212d commit f187c43
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/plugins/processing/algs/qgis/voronoi.py
Expand Up @@ -896,3 +896,12 @@ def computeDelaunayTriangulation(points):

sl = SiteList(pts)
voronoi(sl, c)

def cmp(a, b):
"""Compare the two objects x and y and return an integer according to the
outcome. The return value is negative if x < y, zero if x == y and strictly
positive if x > y.
In python 2 cmp() was a built in function but in python 3 is gone.
"""
return (a > b) - (a < b)

0 comments on commit f187c43

Please sign in to comment.