llm
Download
38 lines 757 BGroffModified 2026-08-27 raw
1234567891011121314151617181920212223242526272829303132333435363738
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH Num.mix 3 2026-08-27 "Tomo man-pages"
.SH NAME
Num.mix \- linear interpolation
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Num.mix\ :\ func(amount:\ Num,\ x:\ Num,\ y:\ Num\ ->\ Num)
.fi
.SH DESCRIPTION
A point between two numbers, exactly. `amount` of zero gives `x`, one gives `y`, and a half gives the true midpoint.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
amount	Num	How far from \fBx\fR toward \fBy\fR. 
x	Num	The value at \fBamount\fR zero. 
y	Num	The value at \fBamount\fR one. 
.TE
.SH RETURN
The interpolated value.

.SH EXAMPLES
.EX
assert (0.25).mix(10, 20) == 12.5
assert (1./3.).mix(0, 1) == 1./3.
.EE
.SH SEE ALSO
.BR Tomo-Num (3)