mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 04:44:32 +03:00
Use divTruncChecked over divFloorChecked in Deriv
This commit is contained in:
parent
95ca4d48e5
commit
05164aad4b
@ -41,7 +41,7 @@ Expr : [ Val I64, Var Str, Add Expr Expr, Mul Expr Expr, Pow Expr Expr, Ln Expr
|
||||
|
||||
divmod : I64, I64 -> Result { div : I64, mod : I64 } [ DivByZero ]*
|
||||
divmod = \l, r ->
|
||||
when Pair (Num.divFloorChecked l r) (Num.remChecked l r) is
|
||||
when Pair (Num.divTruncChecked l r) (Num.remChecked l r) is
|
||||
Pair div (Ok mod) ->
|
||||
Ok { div, mod }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user