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:
authorRobin Allen <roblovski@gmail.com>2008-11-29 19:52:06 +0300
committerRobin Allen <roblovski@gmail.com>2008-11-29 19:52:06 +0300
commit6fbeed135509885ea1d81de8344b9db2181b17e1 (patch)
treeca63108c5d6aed873a4732f090e7e2a0b862f5de
parent6a51ba54cd464ef07bb09f1fa84bd2407ff3e8e7 (diff)
Changed vector math to use library functions.
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_distance.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
index eb6f27e8477..ff9ec4db76b 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
@@ -27,6 +27,7 @@
*/
#include <math.h>
+#include "BLI_arithb.h"
#include "../TEX_util.h"
static bNodeSocketType inputs[]= {
@@ -48,11 +49,7 @@ static void valuefn(float *out, float *coord, bNode *node, bNodeStack **in, shor
tex_input_vec(coord1, in[0], coord, thread);
tex_input_vec(coord2, in[1], coord, thread);
- x = coord2[0] - coord1[0];
- y = coord2[1] - coord1[1];
- z = coord2[2] - coord1[2];
-
- *out = sqrt(x * x + y * y + z * z);
+ *out = VecLenf(coord2, coord1);
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)