amend bug relating to being unable to select on quad tree, related to dividing odd numbers by 2 (because performing integer division on an odd number by 2 results in rounding, which we don't want)

This commit is contained in:
2025-07-07 01:48:15 +01:00
parent dc2a52bcc8
commit 9b2f3e90cb
4 changed files with 98 additions and 52 deletions

View File

@@ -21,7 +21,7 @@ struct
val xClickPoints = ClickPoints.generate (wStart, wFinish, canvasWidth)
val yClickPoints = ClickPoints.generate (hStart, hFinish, canvasHeight)
val maxPoints = Int.max (canvasWidth, canvasHeight) + 1
val maxPoints = Int.max (canvasWidth, canvasHeight)
val squares = Vector.tabulate (maxPoints, fn _ =>
Vector.tabulate (maxPoints, fn _ => 0))
in