Skip to content

Commit 35e2d4e

Browse files
author
Tom De Smedt
committed
nodebox.physics graph = pattern.graph
1 parent e9f685c commit 35e2d4e

File tree

2 files changed

+183
-54
lines changed

2 files changed

+183
-54
lines changed

nodebox/graphics/geometry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ def intersection(self, b):
379379
def union(self, b):
380380
""" Returns bounds that encompass the union of the two.
381381
"""
382+
# Note: this will also work with ghost points.
383+
# Bounds(20, 20, 5, 5).union(Bounds(100, 100, 0, 0)) => Bounds(20, 20, 100, 100).
382384
mx, my = min(self.x, b.x), min(self.y, b.y)
383385
return Bounds(mx, my,
384386
max(self.x+self.width, b.x+b.width) - mx,

0 commit comments

Comments
 (0)