* updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of types docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * add types files Signed-off-by: Jess Frazelle <github@jessfraz.com> * add links Signed-off-by: Jess Frazelle <github@jessfraz.com> * better Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * uodates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
26 KiB
26 KiB
title, excerpt, layout
title | excerpt | layout |
---|---|---|
rem | Compute the remainder after dividing `num` by `div`. | manual |
Compute the remainder after dividing `num` by `div`.
If `num` is negative, the result will be too.
rem(num: i64, divisor: i64) -> i64
Tags
math
Arguments
Name | Type | Description | Required |
---|---|---|---|
num |
i64 |
Yes | |
divisor |
i64 |
Yes |
Returns
i64
Examples
assertEqual(rem(int(7), int(4)), 3, 0.01, "remainder is 3")
assertEqual(rem(int(-7), int(4)), -3, 0.01, "remainder is 3")
assertEqual(rem(int(7), int(-4)), 3, 0.01, "remainder is 3")