about summary refs log tree commit diff
path: root/users/sterni/nix/int/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni/nix/int/default.nix')
-rw-r--r--users/sterni/nix/int/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/users/sterni/nix/int/default.nix b/users/sterni/nix/int/default.nix
index cd46fe7864d1..b3157571272f 100644
--- a/users/sterni/nix/int/default.nix
+++ b/users/sterni/nix/int/default.nix
@@ -97,6 +97,8 @@ let
   # i. e. they truncate towards 0
   mod = a: b: let res = a / b; in a - (res * b);
 
+  inRange = a: b: x: x >= a && x <= b;
+
 in {
   inherit
     maxBound
@@ -117,5 +119,6 @@ in {
     bitXor
     toHex
     fromHex
+    inRange
     ;
 }