diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/chamath.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/chamath.nim b/src/utils/chamath.nim new file mode 100644 index 00000000..579b7b69 --- /dev/null +++ b/src/utils/chamath.nim @@ -0,0 +1,4 @@ +func absSub*(a, b: SomeUnsignedInt): auto {.inline.} = + if a > b: + return a - b + return b - a |