aboutsummaryrefslogtreecommitdiff
path: root/api/bytes.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2026-01-02 15:10:48 -0500
committerBruce Hill <bruce@bruce-hill.com>2026-01-02 15:10:48 -0500
commit9653a7c2e53e2bc5e8f146a7d9ea1e71eed19e08 (patch)
tree7f026a142b4f8efcdbf517cc58adc97eb3b37cd5 /api/bytes.md
parente4d5bf73e4ad9dc51f923a32903011edfeae2908 (diff)
parentce49f93da58d007c0a52ee82e2421adfe06012f9 (diff)
Merge branch 'dev' into constructive-reals
Diffstat (limited to 'api/bytes.md')
-rw-r--r--api/bytes.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/api/bytes.md b/api/bytes.md
index bb54d92c..99055523 100644
--- a/api/bytes.md
+++ b/api/bytes.md
@@ -62,15 +62,16 @@ Determines if an integer is between two numbers (inclusive).
Argument | Type | Description | Default
---------|------|-------------|---------
x | `Byte` | The integer to be checked. | -
-low | `Byte` | The lower bound to check (inclusive). | -
-high | `Byte` | The upper bound to check (inclusive). | -
+low | `Byte` | One end of the range to check (inclusive); | -
+high | `Byte` | The other end of the range to check (inclusive); | -
-**Return:** `yes` if `low <= x and x <= high`, otherwise `no`
+**Return:** `yes` if `a <= x and x <= b` or `b <= x and x <= a`, otherwise `no`
**Example:**
```tomo
assert Byte(7).is_between(1, 10) == yes
+assert Byte(7).is_between(10, 1) == yes
assert Byte(7).is_between(100, 200) == no
assert Byte(7).is_between(1, 7) == yes