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

Math.signum #267

Closed
pollend opened this issue Sep 1, 2020 · 2 comments
Closed

Math.signum #267

pollend opened this issue Sep 1, 2020 · 2 comments

Comments

@pollend
Copy link
Contributor

pollend commented Sep 1, 2020

I would like a function that just provides the sign of the number.

Math.signum(1.2f) == 1.0f
Math.signum(-1.2) == -1.0f
Math.signum(4) == 1
Math.signum(-4) == -1
@httpdigest
Copy link
Member

So, you mean a facade for java.util.Math.signum() and java.lang.Integer/Long.signum(), because java.util.Math.signum() only provides overloads for float and double?

@pollend
Copy link
Contributor Author

pollend commented Sep 2, 2020

I guess a facade is what I'm asking about. it gets a bit problematic when I have to import java.util.Math and org.joml.Math.

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

No branches or pull requests

2 participants