Skip to content

Commit 18c2de1

Browse files
author
Chris Hallberg
committed
Fix examples to reflect new (correct) width/height definitions.
1 parent 639e09f commit 18c2de1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

examples/intersection_qtree/sketch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ function setup() {
3636
}
3737

3838
function draw() {
39-
let boundary = new Rectangle(width / 2, height / 2, width / 2, height / 2);
40-
qtree = new QuadTree(boundary, 4);
39+
qtree = QuadTree.create();
4140

4241
background(0);
4342
fill(255);

examples/visualize_qtree/sketch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function show(qtree, range) {
5151
if (range.intersects(qtree.boundary)) {
5252
stroke(255);
5353
}
54-
rect(qtree.boundary.x, qtree.boundary.y, qtree.boundary.w * 2, qtree.boundary.h * 2);
54+
rect(qtree.boundary.x, qtree.boundary.y, qtree.boundary.w, qtree.boundary.h);
5555

5656
stroke(255);
5757
strokeWeight(2);

0 commit comments

Comments
 (0)