Harden Extend.addPoint for None arguments
This commit is contained in:
parent
e37e0df899
commit
39bd912c90
|
@ -42,14 +42,16 @@ class Extend:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def addPoint(self, x, y):
|
def addPoint(self, x, y):
|
||||||
if self.minx is None or self.minx > x:
|
if x is not None:
|
||||||
self.minx = x
|
if self.minx is None or self.minx > x:
|
||||||
if self.maxx is None or self.maxx < x:
|
self.minx = x
|
||||||
self.maxx = x
|
if self.maxx is None or self.maxx < x:
|
||||||
if self.miny is None or self.miny > y:
|
self.maxx = x
|
||||||
self.miny = y
|
if y is not None:
|
||||||
if self.maxy is None or self.maxy < y:
|
if self.miny is None or self.miny > y:
|
||||||
self.maxy = y
|
self.miny = y
|
||||||
|
if self.maxy is None or self.maxy < y:
|
||||||
|
self.maxy = y
|
||||||
|
|
||||||
def addExtend(self, extend, x, y):
|
def addExtend(self, extend, x, y):
|
||||||
extend = extend + (x, y)
|
extend = extend + (x, y)
|
||||||
|
|
Loading…
Reference in New Issue