-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Optimize
TrapezoidBounds
inside check (#1118)
This was previously delegating to `BoundaryCheck::isInside` with a vector of vertices. This PR: - Does a number of early checks for the trapezoid shape: inside core rectangle, outside y, outside larger x halflength - Uses an `std::array` for the vertices it passes to the `isInside` call, which reduces the number of heap allocations.
- Loading branch information
1 parent
b6695fd
commit a0e4a18
Showing
2 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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