Skip to content

Vector3F.CompareTo always returns 0. #1

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

Open
UnknownShadow200 opened this issue Jul 7, 2015 · 1 comment
Open

Vector3F.CompareTo always returns 0. #1

UnknownShadow200 opened this issue Jul 7, 2015 · 1 comment

Comments

@UnknownShadow200
Copy link

public int CompareTo( Vector3I other ) {
      return Math.Sign( LengthSquared - LengthSquared );
}

public int CompareTo( Vector3F other ) {
      return Math.Sign( LengthSquared - LengthSquared );
}

Guessing you meant other.LengthSquared the second time?

@mstefarov
Copy link
Owner

You're right, this was meant to compare lengths of the two vectors. Oops. I don't think the method ended up being used anywhere in the codebase though, so it wasn't caught.

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