1234567891011121314151617181920212223242526272829303132333435363738 | '\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Num.mix 3 2025-11-29 "Tomo man-pages"
.SH NAME
Num.mix \- mix two numbers by an amount
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Num.mix\ :\ func(amount:\ Num,\ x:\ Num,\ y:\ Num\ ->\ Num)
.fi
.SH DESCRIPTION
Interpolates between two numbers based on a given amount.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx
l l l.
Name Type Description
amount Num The interpolation factor (between \fB0\fR and \fB1\fR).
x Num The starting number.
y Num The ending number.
.TE
.SH RETURN
The interpolated number between `x` and `y` based on `amount`.
.SH EXAMPLES
.EX
assert (0.5).mix(10, 20) == 15
assert (0.25).mix(10, 20) == 12.5
.EE
.SH SEE ALSO
.BR Tomo-Num (3)
|