From 37e4a311b0ad9da7177e50620efc3561e2dd7045 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 10 Nov 2009 20:43:45 +0000 Subject: Math Lib * Convert all code to use new functions. * Branch maintainers may want to skip this commit, and run this conversion script instead, if they use a lot of math functions in new code: http://www.pasteall.org/9052/python --- source/blender/nodes/intern/TEX_nodes/TEX_distance.c | 4 ++-- source/blender/nodes/intern/TEX_nodes/TEX_rotate.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/nodes/intern/TEX_nodes') diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c index 297fc02939d..5355b3f0fff 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c @@ -27,7 +27,7 @@ */ #include -#include "BLI_arithb.h" +#include "BLI_math.h" #include "../TEX_util.h" static bNodeSocketType inputs[]= { @@ -48,7 +48,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor tex_input_vec(coord1, in[0], p, thread); tex_input_vec(coord2, in[1], p, thread); - *out = VecLenf(coord2, coord1); + *out = len_v3v3(coord2, coord1); } static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c index 2184d32fcf2..1f550e32135 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c @@ -65,19 +65,19 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor if(magsq == 0) magsq = 1; - ndx = Inpf(coord, ax); + ndx = dot_v3v3(coord, ax); para[0] = ax[0] * ndx * (1 - cos_a); para[1] = ax[1] * ndx * (1 - cos_a); para[2] = ax[2] * ndx * (1 - cos_a); - VecSubf(perp, coord, para); + sub_v3_v3v3(perp, coord, para); perp[0] = coord[0] * cos_a; perp[1] = coord[1] * cos_a; perp[2] = coord[2] * cos_a; - Crossf(cp, ax, coord); + cross_v3_v3v3(cp, ax, coord); cp[0] = cp[0] * sin_a; cp[1] = cp[1] * sin_a; -- cgit v1.2.3