SetInt64 calls (big.Int).SetInt64.
(x int64)
| 875 | |
| 876 | // SetInt64 calls (big.Int).SetInt64. |
| 877 | func (z *BigInt) SetInt64(x int64) *BigInt { |
| 878 | neg := false |
| 879 | if x < 0 { |
| 880 | neg = true |
| 881 | x = -x |
| 882 | } |
| 883 | z.updateInnerFromUint64(uint64(x), neg) |
| 884 | return z |
| 885 | } |
| 886 | |
| 887 | // SetString calls (big.Int).SetString. |
| 888 | func (z *BigInt) SetString(s string, base int) (*BigInt, bool) { |