code / tomo

Lines41.3K C23.7K Markdown9.7K YAML5.0K Tomo2.3K
7 others 763
Python231 Shell230 make212 INI47 Text21 SVG16 Lua6
(38 lines)
1 '\" t
2 .\" Copyright (c) 2025 Bruce Hill
3 .\" All rights reserved.
4 .\"
5 .TH Num.mix 3 2025-11-29 "Tomo man-pages"
6 .SH NAME
7 Num.mix \- mix two numbers by an amount
8 .SH LIBRARY
9 Tomo Standard Library
10 .SH SYNOPSIS
11 .nf
12 .BI Num.mix\ :\ func(amount:\ Num,\ x:\ Num,\ y:\ Num\ ->\ Num)
13 .fi
14 .SH DESCRIPTION
15 Interpolates between two numbers based on a given amount.
18 .SH ARGUMENTS
20 .TS
21 allbox;
22 lb lb lbx
23 l l l.
24 Name Type Description
25 amount Num The interpolation factor (between \fB0\fR and \fB1\fR).
26 x Num The starting number.
27 y Num The ending number.
28 .TE
29 .SH RETURN
30 The interpolated number between `x` and `y` based on `amount`.
32 .SH EXAMPLES
33 .EX
34 assert (0.5).mix(10, 20) == 15
35 assert (0.25).mix(10, 20) == 12.5
36 .EE
37 .SH SEE ALSO
38 .BR Tomo-Num (3)