Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integer vertices keep their dtype during edge subtraction and cross products in
face_areas. Products can overflow and unsigned arithmetic can wrap, giving wrong face areas and, throughvertex_areas, wrong vertex masses. For example, an int16 right triangle with 300-unit edges returns 12,232 instead of 45,000.Widen integer coordinates before subtraction, then convert the resulting edges to floating point before taking cross products. The 64-bit case uses Python integers to retain small edges even at a large integer origin. Float inputs keep the existing arithmetic, and inputs are not mutated.
Add two regression methods covering all eight integer dtypes, both windings, float controls and translated 64-bit coordinates. All 13 project tests pass on Python 3.12/NumPy 2.5 with locally built Debug bindings and on Python 3.9/NumPy 1.26 with released 1.4.0 bindings and the current Python source. The patch changes no C++ code.
An additional audit of the included Bunny scan, using an independent Heron reference with 70-digit arithmetic, restores 24 incorrect area, mass and integration configurations. All 16 previously correct configurations remain byte-identical, including eight float controls.
git diff --checkpasses.