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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-07 02:48:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-07 02:48:28 +0400
commit3a0593cc3d5de33248b3a7b913a45729c37dc1b4 (patch)
tree88fcddc5e3c060c87a6313d853315f0efa484a52 /source/blender/blenkernel/intern/softbody.c
parent2336aadb80f8602f001b2c5b0bcaacf3ad858f83 (diff)
code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
also added some comments.
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 63f0a29821f..1d6895a8c71 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1718,15 +1718,15 @@ static int choose_winner(float*w, float* pos, float*a, float*b, float*c, float*c
{
float mindist, cp;
int winner =1;
- mindist = ABS(dot_v3v3(pos, a));
+ mindist = fabsf(dot_v3v3(pos, a));
- cp = ABS(dot_v3v3(pos, b));
+ cp = fabsf(dot_v3v3(pos, b));
if ( mindist < cp ) {
mindist = cp;
winner =2;
}
- cp = ABS(dot_v3v3(pos, c));
+ cp = fabsf(dot_v3v3(pos, c));
if (mindist < cp ) {
mindist = cp;
winner =3;