Skip to content

Instantly share code, notes, and snippets.

## Bilinear version of godot lerpf.
## x →
## p01 +-----------+ p11
## | | |
## |---p-------| y ↑
## | | |
## p00 +-----------+ p10
## The square param Vector4 is in this order, value at: p00, p01, p10, p11.
## Return the bilinearly interpolated value at point p. Weights are in order
## weight for x axis then y axis. They can be viewed as the coordinates of p