Skip to content

Conversation

sweetniamhy
Copy link
Contributor

@sweetniamhy sweetniamhy commented Sep 23, 2025

Description

  • temp AABB will be removed from this PR once it is released from beta to latest stable.
  • Added AABBUtils for working with AABB, taking inspiration from Vector3Utils.
  • Added test suite for AABBUtils with mocked BlockVolume.
  • Added Vector3Utils.ceil with tests to match the Vector3Utils.floor (used by AABBUtils).
  • Fixed math libraries api-extractor.json and just.config.cts since they pointed to incorrect paths.

Reviewing

  • getBlockVolume uses an epsilon so AABBs that have min/max within it are rounded eg. min of -1.0001 becomes -1, max of 1.0001 becomes 1, min of -1.0002 becomes -2, max of 1.0002 becomes 2.
  • Typescript doesn't treat +0 and -0 the same, I could have used Vector3Utils.equal and Vector3Utils.toString to construct the 'expect' tests but I chose to use -0 so that I can use 'toEqual' on the expected vectors.

@sweetniamhy sweetniamhy changed the title AABBUtils AABBUtils and Vector3Utils.ceil Sep 24, 2025
@sweetniamhy sweetniamhy force-pushed the niamh.cuileann/aabbutils branch from ae95cbe to ddf9033 Compare September 24, 2025 18:14
@sweetniamhy sweetniamhy force-pushed the niamh.cuileann/aabbutils branch from ddf9033 to a26c746 Compare September 25, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant