(37 lines)
1 '\" t2 .\" Copyright (c) 2025 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH Num.clamped 3 2025-11-29 "Tomo man-pages"6 .SH NAME7 Num.clamped \- clamp a number8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI Num.clamped\ :\ func(x:\ Num,\ low:\ Num,\ high:\ Num\ ->\ Num)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 Num The number to clamp.26 low Num The lowest value the result can take.27 high Num 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.5).clamped(5.5, 10.5) == 5.535 .EE36 .SH SEE ALSO37 .BR Tomo-Num (3)