ChainSafe / fixed-sized-numbers-ts

Fixed Sized BigNumbers in TypeScript
2 stars 4 forks source link

Allow zero to be the a dividend #11

Closed ansermino closed 5 years ago

ansermino commented 5 years ago
const zero = Uint8('0')
const two = Uint8('2')
zero.div(two)

Currently the above throws a DivisionByZero error when in fact zero is the dividend not the divisor. This should be a legal operation resulting in 0.