Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifications and potential bug #131

Closed
AntonioNoack opened this issue Jul 28, 2022 · 1 comment
Closed

Simplifications and potential bug #131

AntonioNoack opened this issue Jul 28, 2022 · 1 comment

Comments

@AntonioNoack
Copy link

Hi, I was reading a lot of the library, because I ported it to use JOML instead of float[3]s.
I discovered multiple places like

if(a < b) return -1;
else if(a > b) return +1;
return 0;

This could be simplified with Integer.compare(a,b) or Float.compare(a,b) (depending on the type).

The bug I discovered is that in RecastContour.getCornerHeight() a boolean is passed, that probably originally was a reference. In Java, it just gets passed, and never set to true. (IntelliSense told me)

@ppiastucki
Copy link
Collaborator

Well spotted. Thank you very much for reporting.

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

No branches or pull requests

2 participants