Skip to content
Snippets Groups Projects
Commit c6ab9323 authored by Jayke Meijer's avatar Jayke Meijer
Browse files

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
No related branches found
No related tags found
No related merge requests found
class Point:
def __init__(self, corner):
self.x = corner.getAttribute("x")
self.y = corner.getAttribute("y")
\ No newline at end of file
def __init__(self, corner = None, coordinates = None):
if corner != None:
self.x = corner.getAttribute("x")
self.y = corner.getAttribute("y")
elif coordinates != None:
self.x = coordinates[0]
self.y = coordinates[1]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment