Solve Problem 13
This commit is contained in:
parent
c00b895deb
commit
eb8b79c249
1 changed files with 6 additions and 2 deletions
|
|
@ -52,7 +52,11 @@ class Rectangle:
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
r = Rectangle(Point(0, 0), 10, 5)
|
def diagonal(self):
|
||||||
#print(r)
|
pnt = Point(self.width, self.height)
|
||||||
print(r.contains(Point(-9, .0001)))
|
return pnt.distanceFromOrigin()
|
||||||
|
|
||||||
|
r = Rectangle(Point(-10, 5), 4, 30)
|
||||||
|
#print(r)
|
||||||
|
print(r.diagonal())
|
||||||
|
|
||||||
Loading…
Reference in a new issue