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:
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc
index 85e0f262ca7..53be5bc09d9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc
@@ -130,7 +130,7 @@ class GradientFunction : public fn::MultiFunction {
/* Bias a little bit for the case where input is a unit length vector,
* to get exactly zero instead of a small random value depending
* on float precision. */
- const float r = std::max(0.999999f - vector[i].length(), 0.0f);
+ const float r = std::max(0.999999f - math::length(vector[i]), 0.0f);
fac[i] = r * r;
}
break;
@@ -140,7 +140,7 @@ class GradientFunction : public fn::MultiFunction {
/* Bias a little bit for the case where input is a unit length vector,
* to get exactly zero instead of a small random value depending
* on float precision. */
- fac[i] = std::max(0.999999f - vector[i].length(), 0.0f);
+ fac[i] = std::max(0.999999f - math::length(vector[i]), 0.0f);
}
break;
}