()
| 150 | } |
| 151 | |
| 152 | func (self *IntValue) Sign() int { |
| 153 | if self.isbig { |
| 154 | return self.bigint.Sign() |
| 155 | } else { |
| 156 | if self.integer < 0 { |
| 157 | return -1 |
| 158 | } else if self.integer == 0 { |
| 159 | return 0 |
| 160 | } else { |
| 161 | return 1 |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | func (self IntValue) Max(other IntValue) (IntValue, error) { |
| 167 | return self.intOp(other, func(a, b int64) (int64, bool) { |
no outgoing calls