Skip to content

Commit

Permalink
[orx-quadtree] switch to referential equality (#207)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Ellis <jbellis@gmail.com>
  • Loading branch information
2 people authored and edwinRNDR committed Dec 18, 2021
1 parent bc18782 commit 6e00ca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orx-quadtree/src/commonMain/kotlin/Quadtree.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Quadtree<T>(val bounds: Rectangle, val maxObjects: Int = 10, val mapper: (

for (interNode in intersected) {
for (obj in interNode.objects) {
if (element == obj) continue
if (element === obj) continue
val p = mapper(obj)

val dist = p.squaredDistanceTo(point)
Expand Down

0 comments on commit 6e00ca2

Please sign in to comment.