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

Vector2.clamped doesn't handle INFs #29714

Closed
razcore-rad opened this issue Jun 12, 2019 · 2 comments · Fixed by #100204
Closed

Vector2.clamped doesn't handle INFs #29714

razcore-rad opened this issue Jun 12, 2019 · 2 comments · Fixed by #100204

Comments

@razcore-rad
Copy link
Contributor

Godot version:
3.1.1.stable.official

Vector2.clamped returns nans (Not a Number) when operating on vectors with INF components while clamp global function seems to work just fine, I'd expect Vector2.clamped to be able to handle INFs as well.

@razcore-rad
Copy link
Contributor Author

I think this is a more general problem with INF Vector math as Vector2(INF, 0) * Vector2.ZERO also gives Vector2(-nan, 0) say. I haven't tried Vector3 yet

@KoBeWi
Copy link
Member

KoBeWi commented Jul 21, 2020

Still valid in 173ebe4

Although if it's impossible to fix it without math hacks (affecting performance), it should just be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants