mobile: Add GetSign to mobile BigInt#15558
Conversation
|
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
|
@karalabe ping |
There was a problem hiding this comment.
Why not just call it Sign(), (and optionally reuse the parent docs):
// Sign returns:
//
// -1 if x < 0
// 0 if x == 0
// +1 if x > 0
//
func (bi *BigInt) Sign() int{
return bi.bigint.Sign()
}
|
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
Currently, the only way of getting the sign of a BigInt from mobile is coverting to string. This adds a Sign function to make conversion faster.
|
Done |
Currently, the only way of getting the sign of a BigInt from mobile is
coverting to string. This adds a GetSign function to make conversion
faster.