#include <qx/math/common.h>
#include <glm/glm.hpp>
Go to the source code of this file.
- Author
- Khrapov
- Date
- 6.08.2022
- Copyright
- © Nick Khrapov, 2022. All right reserved.
Definition in file interpolation.h.
◆ bilinear_interpolation()
double qx::bilinear_interpolation |
( |
const glm::dvec3 & |
p0, |
|
|
const glm::dvec3 & |
p1, |
|
|
const glm::dvec3 & |
p2, |
|
|
const glm::dvec3 & |
p3, |
|
|
const glm::dvec2 & |
p |
|
) |
| |
|
inline |
Bilinear interpolation algorithm.
po.z is returned on any error
- Parameters
-
p0 | - point 0 (x, y - coordinates, z - f(x, y)) |
p1 | - point 1 (x, y - coordinates, z - f(x, y)) |
p2 | - point 2 (x, y - coordinates, z - f(x, y)) |
p3 | - point 3 (x, y - coordinates, z - f(x, y)) |
p | - point (x, y - coordinates). It can be out of points square, in this case algorithm called extrapolation |
- Return values
-
Definition at line 46 of file interpolation.h.
◆ linear_interpolation()
double qx::linear_interpolation |
( |
const glm::dvec2 & |
p0, |
|
|
const glm::dvec2 & |
p1, |
|
|
double |
x |
|
) |
| |
|
inline |
Linear interpolation algorithm.
- Parameters
-
p0 | - point 0 (x - coordinate, y - f(x)) |
p1 | - point 1 (x - coordinate, y - f(x)) |
x | - point |
- Return values
-
Definition at line 27 of file interpolation.h.