Bilinear interpolation @param a the first point (0, 0) @param b the second point (1, 0) @param c the third point (0, 1) @param d the fourth point (1, 1) @param tx the x @param ty the y @return the bilerped value
(double a, double b, double c, double d, double x, double y)
| 101 | * @return the bilerped value |
| 102 | */ |
| 103 | public static double bilerp(double a, double b, double c, double d, double x, double y) { |
| 104 | return lerp(lerp(a, b, x), lerp(c, d, x), y); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Trilinear interpolation |