Commit c6ab9323 authored by Jayke Meijer's avatar Jayke Meijer

Modified Point init to accept a tuple of coordinates as well, for easy...

Modified Point init to accept a tuple of coordinates as well, for easy testing. Should be backwards compatible.
parent 5cced020
class Point: class Point:
def __init__(self, corner): def __init__(self, corner = None, coordinates = None):
if corner != None:
self.x = corner.getAttribute("x") self.x = corner.getAttribute("x")
self.y = corner.getAttribute("y") self.y = corner.getAttribute("y")
elif coordinates != None:
self.x = coordinates[0]
self.y = coordinates[1]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment