diff --git a/index.rsh b/index.rsh index 8a8eb89..82cf88d 100644 --- a/index.rsh +++ b/index.rsh @@ -4,14 +4,6 @@ // Inspired by https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol // Ensures Reach programs handle mathematical operations safely. -export const tryDiv = (a, b) => { - if (a == 0 || b == 0) { - return 0; - } else { - return a / b; - } -}; - export const trySub = (a, b) => { if (a < b) { return 0; @@ -29,6 +21,15 @@ export const tryAdd = (a, b) => { } }; +export const tryDiv = (a, b) => { + if (a == 0 || b == 0) { + return 0; + } else { + return a / b; + } +}; + + export const tryMul = (a, b) => { if (a == 0) { return 0