aboutsummaryrefslogtreecommitdiff
path: root/src/environment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/environment.c')
-rw-r--r--src/environment.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/environment.c b/src/environment.c
index 927f2e87..f32471a4 100644
--- a/src/environment.c
+++ b/src/environment.c
@@ -87,6 +87,7 @@ env_t *global_env(void)
{"Byte", Type(ByteType), "Byte_t", "Byte$info", TypedList(ns_entry_t,
{"max", "Byte$max", "Byte"},
{"hex", "Byte$hex", "func(byte:Byte, uppercase=yes, prefix=no -> Text)"},
+ {"is_between", "Byte$is_between", "func(x:Byte,low:Byte,high:Byte -> Bool)"},
{"min", "Byte$min", "Byte"},
{"to", "Byte$to", "func(first:Byte,last:Byte,step:Int8?=none -> func(->Byte?))"},
)},
@@ -102,6 +103,7 @@ env_t *global_env(void)
{"format", "Int$format", "func(i:Int, digits=0 -> Text)"},
{"gcd", "Int$gcd", "func(x,y:Int -> Int)"},
{"hex", "Int$hex", "func(i:Int, digits=0, uppercase=yes, prefix=yes -> Text)"},
+ {"is_between", "Int$is_between", "func(x:Int,low:Int,high:Int -> Bool)"},
{"is_prime", "Int$is_prime", "func(x:Int,reps=50 -> Bool)"},
{"left_shifted", "Int$left_shifted", "func(x,y:Int -> Int)"},
{"minus", "Int$minus", "func(x,y:Int -> Int)"},
@@ -134,6 +136,7 @@ env_t *global_env(void)
{"gcd", "Int64$gcd", "func(x,y:Int64 -> Int64)"},
{"parse", "Int64$parse", "func(text:Text -> Int64?)"},
{"hex", "Int64$hex", "func(i:Int64, digits=0, uppercase=yes, prefix=yes -> Text)"},
+ {"is_between", "Int64$is_between", "func(x:Int64,low:Int64,high:Int64 -> Bool)"},
{"max", "Int64$max", "Int64"},
{"min", "Int64$min", "Int64"},
{"modulo", "Int64$modulo", "func(x,y:Int64 -> Int64)"},
@@ -155,6 +158,7 @@ env_t *global_env(void)
{"gcd", "Int32$gcd", "func(x,y:Int32 -> Int32)"},
{"parse", "Int32$parse", "func(text:Text -> Int32?)"},
{"hex", "Int32$hex", "func(i:Int32, digits=0, uppercase=yes, prefix=yes -> Text)"},
+ {"is_between", "Int32$is_between", "func(x:Int32,low:Int32,high:Int32 -> Bool)"},
{"max", "Int32$max", "Int32"},
{"min", "Int32$min", "Int32"},
{"modulo", "Int32$modulo", "func(x,y:Int32 -> Int32)"},
@@ -176,6 +180,7 @@ env_t *global_env(void)
{"gcd", "Int16$gcd", "func(x,y:Int16 -> Int16)"},
{"parse", "Int16$parse", "func(text:Text -> Int16?)"},
{"hex", "Int16$hex", "func(i:Int16, digits=0, uppercase=yes, prefix=yes -> Text)"},
+ {"is_between", "Int16$is_between", "func(x:Int16,low:Int16,high:Int16 -> Bool)"},
{"max", "Int16$max", "Int16"},
{"min", "Int16$min", "Int16"},
{"modulo", "Int16$modulo", "func(x,y:Int16 -> Int16)"},
@@ -197,6 +202,7 @@ env_t *global_env(void)
{"gcd", "Int8$gcd", "func(x,y:Int8 -> Int8)"},
{"parse", "Int8$parse", "func(text:Text -> Int8?)"},
{"hex", "Int8$hex", "func(i:Int8, digits=0, uppercase=yes, prefix=yes -> Text)"},
+ {"is_between", "Int8$is_between", "func(x:Int8,low:Int8,high:Int8 -> Bool)"},
{"max", "Int8$max", "Int8"},
{"min", "Int8$min", "Int8"},
{"modulo", "Int8$modulo", "func(x,y:Int8 -> Int8)"},
@@ -219,6 +225,7 @@ env_t *global_env(void)
{"format", "Num$format", "func(n:Num, precision=16 -> Text)"},
{"scientific", "Num$scientific", "func(n:Num,precision=0 -> Text)"},
{"percent", "Num$percent", "func(n:Num,precision=0 -> Text)"},
+ {"is_between", "Num$is_between", "func(x:Num,low:Num,high:Num -> Bool)"},
{"isinf", "Num$isinf", "func(n:Num -> Bool)"},
{"isfinite", "Num$isfinite", "func(n:Num -> Bool)"},
{"modulo", "Num$mod", "func(x,y:Num -> Num)"},
@@ -251,6 +258,7 @@ env_t *global_env(void)
{"format", "Num32$format", "func(n:Num32, precision=8 -> Text)"},
{"scientific", "Num32$scientific", "func(n:Num32, precision=0 -> Text)"},
{"percent", "Num32$percent", "func(n:Num32,precision=0 -> Text)"},
+ {"is_between", "Num32$is_between", "func(x:Num32,low:Num32,high:Num32 -> Bool)"},
{"isinf", "Num32$isinf", "func(n:Num32 -> Bool)"},
{"isfinite", "Num32$isfinite", "func(n:Num32 -> Bool)"},
C(2_SQRTPI), C(E), C(PI_2), C(2_PI), C(1_PI), C(LN10), C(LN2), C(LOG2E),