prb-math
prb-math copied to clipboard
A `sign` function for signed types
Describe the feature you would like
I was wondering, whether [...] should offer a proper signum (sign might be too confusing due to cryptographic functions) function that returns the indication (-1, 0, or 1) of the sign of a 32-byte signed integer. Thoughts?
Additional context
The quote above is from @pcaversaccio
I was thinking that, if this is a math operation that is usefull to some users, it should probably be in PRBMath.
Thanks for the feature request, @Amxx! I will consider it.