-
Notifications
You must be signed in to change notification settings - Fork 15
Chung Leong edited this page Jan 10, 2022
·
3 revisions
mix - Linear interpolation between two numbers
float mix(float $x, float $y, float $a)
mix() calculates x * ( 1 - a ) + y * a. If a is 0, the return value is x. If a is 1, the return value is y.
x - The base value. It can be a scalar or an array.
y - The top value. It can be a scalar or an array.
a - The amount. It can be a scalar or an array.
A number between x and y. If x, y, or a is an array, then return value is also an array, the size of which match the largest of the three.
1.0 and above.