From d0de60dc33df75fbcacb53a09568b14d0fd48cb9 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 12 Jun 2023 17:09:55 +0200 Subject: Multithreaded world generation with Perlin --- src/Math/Interpolation.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Math/Interpolation.hpp (limited to 'src/Math/Interpolation.hpp') diff --git a/src/Math/Interpolation.hpp b/src/Math/Interpolation.hpp new file mode 100644 index 0000000..9eaf604 --- /dev/null +++ b/src/Math/Interpolation.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include "Common.hpp" +#include "Grid.hpp" + +namespace Math { + +float linear_interpolation(Vector<2> val, float left, float right, float pos); +float bilinear_interpolation(Matrix<2, 2> val, GridCellBoundaries cell, Vector<2> pos); +float trilinear_interpolation(Matrix<2, 2> val_front, Matrix<2, 2> val_back, CubeCellBoundaries cell, Vector<3> pos); + +} \ No newline at end of file -- cgit 1.4.1