(37 lines)
1 '\" t2 .\" Copyright (c) 2026 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH Int.clamped 3 2026-01-19 "Tomo man-pages"6 .SH NAME7 Int.clamped \- clamp an integer8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI Int.clamped\ :\ func(x:\ Int,\ low:\ Int,\ high:\ Int\ ->\ Int)13 .fi14 .SH DESCRIPTION15 Returns the given number clamped between two values so that it is within that range.18 .SH ARGUMENTS20 .TS21 allbox;22 lb lb lbx23 l l l.24 Name Type Description25 x Int The integer to clamp.26 low Int The lowest value the result can take.27 high Int The highest value the result can take.28 .TE29 .SH RETURN30 The first argument clamped between the other two arguments.32 .SH EXAMPLES33 .EX34 assert 2.clamped(5, 10) == 535 .EE36 .SH SEE ALSO37 .BR Tomo-Int (3)