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 'intern/cycles/kernel/osl/nodes/node_vector_math.osl')
-rw-r--r--intern/cycles/kernel/osl/nodes/node_vector_math.osl16
1 files changed, 8 insertions, 8 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_vector_math.osl b/intern/cycles/kernel/osl/nodes/node_vector_math.osl
index 9e0f0b60522..f22a6e8441a 100644
--- a/intern/cycles/kernel/osl/nodes/node_vector_math.osl
+++ b/intern/cycles/kernel/osl/nodes/node_vector_math.osl
@@ -25,27 +25,27 @@ shader node_vector_math(
output float Value = 0.0,
output vector Vector = vector(0.0, 0.0, 0.0))
{
- if(type == "Add") {
+ if (type == "Add") {
Vector = Vector1 + Vector2;
- Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
+ Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2])) / 3.0;
}
- if(type == "Subtract") {
+ if (type == "Subtract") {
Vector = Vector1 - Vector2;
- Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
+ Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2])) / 3.0;
}
- if(type == "Average") {
+ if (type == "Average") {
Value = length(Vector1 + Vector2);
Vector = normalize(Vector1 + Vector2);
}
- if(type == "Dot Product") {
+ if (type == "Dot Product") {
Value = dot(Vector1, Vector2);
}
- if(type == "Cross Product") {
+ if (type == "Cross Product") {
vector c = cross(Vector1, Vector2);
Value = length(c);
Vector = normalize(c);
}
- if(type == "Normalize") {
+ if (type == "Normalize") {
Value = length(Vector1);
Vector = normalize(Vector1);
}