Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-07-21 16:30:07 +0300
committerHans Goudey <h.goudey@me.com>2022-07-21 16:30:07 +0300
commit4ba6bac2f1a45fbd0715dd076992cf21f41f262f (patch)
treeafef432ed90a76ccf9806f520e6370a8108156d4 /source/blender/blenlib/tests
parent63be57307eba75c05e7584a2e43373e489b451fb (diff)
Fix build error in tests binary after previous commit
Also remove an unused include and add a comment, const, use the math namespace.
Diffstat (limited to 'source/blender/blenlib/tests')
-rw-r--r--source/blender/blenlib/tests/BLI_length_parameterize_test.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenlib/tests/BLI_length_parameterize_test.cc b/source/blender/blenlib/tests/BLI_length_parameterize_test.cc
index d59f7ae3c28..3b41a7aed0c 100644
--- a/source/blender/blenlib/tests/BLI_length_parameterize_test.cc
+++ b/source/blender/blenlib/tests/BLI_length_parameterize_test.cc
@@ -32,7 +32,7 @@ TEST(length_parameterize, FloatSimple)
Array<float> factors(4);
sample_uniform(lengths, true, indices, factors);
Array<float> results(4);
- linear_interpolation<float>(values, indices, factors, results);
+ interpolate<float>(values, indices, factors, results);
Array<float> expected({
0.0f,
1.33333f,
@@ -54,7 +54,7 @@ TEST(length_parameterize, Float)
Array<float> factors(20);
sample_uniform(lengths, true, indices, factors);
Array<float> results(20);
- linear_interpolation<float>(values, indices, factors, results);
+ interpolate<float>(values, indices, factors, results);
Array<float> expected({
1.0f, 1.47368f, 1.94737f, 2.42105f, 2.89474f, 3.36842f, 3.84211f,
4.31579f, 4.78947f, 5.26316f, 5.73684f, 6.21053f, 6.68421f, 7.1579f,
@@ -75,7 +75,7 @@ TEST(length_parameterize, Float2)
Array<float> factors(12);
sample_uniform(lengths, true, indices, factors);
Array<float2> results(12);
- linear_interpolation<float2>(values, indices, factors, results);
+ interpolate<float2>(values, indices, factors, results);
Array<float2> expected({
{0.0f, 0.0f},
{0.272727f, 0.0f},
@@ -105,7 +105,7 @@ TEST(length_parameterize, Float2Cyclic)
Array<float> factors(12);
sample_uniform(lengths, false, indices, factors);
Array<float2> results(12);
- linear_interpolation<float2>(values, indices, factors, results);
+ interpolate<float2>(values, indices, factors, results);
Array<float2> expected({
{0.0f, 0.0f},
{0.333333f, 0.0f},
@@ -135,7 +135,7 @@ TEST(length_parameterize, LineMany)
Array<float> factors(5007);
sample_uniform(lengths, true, indices, factors);
Array<float> results(5007);
- linear_interpolation<float>(values, indices, factors, results);
+ interpolate<float>(values, indices, factors, results);
Array<float> expected({
1.9962f, 1.9964f, 1.9966f, 1.9968f, 1.997f, 1.9972f, 1.9974f, 1.9976f, 1.9978f, 1.998f,
1.9982f, 1.9984f, 1.9986f, 1.9988f, 1.999f, 1.9992f, 1.9994f, 1.9996f, 1.9998f, 2.0f,
@@ -154,7 +154,7 @@ TEST(length_parameterize, CyclicMany)
Array<float> factors(5007);
sample_uniform(lengths, false, indices, factors);
Array<float2> results(5007);
- linear_interpolation<float2>(values, indices, factors, results);
+ interpolate<float2>(values, indices, factors, results);
Array<float2> expected({
{0, 0.0159776}, {0, 0.0151787}, {0, 0.0143797}, {0, 0.013581}, {0, 0.0127821},
{0, 0.0119832}, {0, 0.0111842}, {0, 0.0103855}, {0, 0.00958657}, {0, 0.00878763},
@@ -178,7 +178,7 @@ TEST(length_parameterize, InterpolateColor)
Array<float> factors(10);
sample_uniform(lengths, false, indices, factors);
Array<ColorGeometry4f> results(10);
- linear_interpolation<ColorGeometry4f>(colors, indices, factors, results);
+ interpolate<ColorGeometry4f>(colors, indices, factors, results);
Array<ColorGeometry4f> expected({
{0, 0, 0, 1},
{0.4, 0, 0, 1},
@@ -209,7 +209,7 @@ TEST(length_parameterize, ArbitraryFloatSimple)
Array<float> factors(4);
sample_at_lengths(lengths, sample_lengths, indices, factors);
Array<float> results(4);
- linear_interpolation<float>(values, indices, factors, results);
+ interpolate<float>(values, indices, factors, results);
Array<float> expected({
0.5f,
1.5f,
@@ -232,7 +232,7 @@ TEST(length_parameterize, ArbitraryFloat2)
Array<float> factors(12);
sample_at_lengths(lengths, sample_lengths, indices, factors);
Array<float2> results(12);
- linear_interpolation<float2>(values, indices, factors, results);
+ interpolate<float2>(values, indices, factors, results);
Array<float2> expected({
{0.5f, 0.0f},
{1.0f, 0.5f},