mix

taichi_glsl.scalar.mix(x, y, a)

Linearly interpolate between two values.

mix performs a linear interpolation between x and y using a to weight between them.

Parameters
  • x – Specify the start of the range in which to interpolate.

  • y – Specify the end of the range in which to interpolate.

  • a – Specify the value to use to interpolate between x and y.

Returns

The return value is computed as x * (1 - a) + y * a.