aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-Int.is_between.3
diff options
context:
space:
mode:
Diffstat (limited to 'man/man3/tomo-Int.is_between.3')
-rw-r--r--man/man3/tomo-Int.is_between.311
1 files changed, 6 insertions, 5 deletions
diff --git a/man/man3/tomo-Int.is_between.3 b/man/man3/tomo-Int.is_between.3
index 8087e0d0..fd54eb41 100644
--- a/man/man3/tomo-Int.is_between.3
+++ b/man/man3/tomo-Int.is_between.3
@@ -2,14 +2,14 @@
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
-.TH Int.is_between 3 2025-11-29 "Tomo man-pages"
+.TH Int.is_between 3 2025-12-31 "Tomo man-pages"
.SH NAME
Int.is_between \- test if an int is in a range
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
-.BI Int.is_between\ :\ func(x:\ Int,\ low:\ Int,\ high:\ Int\ ->\ Bool)
+.BI Int.is_between\ :\ func(x:\ Int,\ a:\ Int,\ b:\ Int\ ->\ Bool)
.fi
.SH DESCRIPTION
Determines if an integer is between two numbers (inclusive).
@@ -23,15 +23,16 @@ lb lb lbx
l l l.
Name Type Description
x Int The integer to be checked.
-low Int The lower bound to check (inclusive).
-high Int The upper bound to check (inclusive).
+a Int One end of the range to check (inclusive).
+b Int The other end of the range to check (inclusive).
.TE
.SH RETURN
-`yes` if `low <= x and x <= high`, otherwise `no`
+`yes` if `a <= x and x <= b` or `a >= x and x >= b`, otherwise `no`
.SH EXAMPLES
.EX
assert (7).is_between(1, 10) == yes
+assert (7).is_between(10, 1) == yes
assert (7).is_between(100, 200) == no
assert (7).is_between(1, 7) == yes
.EE