> For the complete documentation index, see [llms.txt](https://augustus-pash.gitbook.io/wasm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://augustus-pash.gitbook.io/wasm/maths-algorithms/mix.md).

# Mix

Interpolate between x and y using a.

```javascript
(module
  (func $mix (export "mix") (param $x f32) (param $y f32) (param $a f32) (result f32)
    (f32.add
      (f32.mul 
        (get_local $x) 
        (f32.sub 
          (f32.const 1)
          (get_local $a)
        )
      )
      (f32.mul 
        (get_local $y)
        (get_local $a)
      )
    )
  )
)
```
