diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-28 18:05:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-28 18:05:00 +0400 |
commit | ed04c213745362fcab99cdda89343aca7cbb65e5 (patch) | |
tree | e1a6819df36bca9a884104882a2d146da1ba4c89 /source/blender/blenlib/intern/BLI_kdtree.c | |
parent | 150cedac5da7bfce5fdd7c621cb682d6f3e66c8b (diff) |
code cleanup: use float vector size in function definitions, and const's where the values are unchanged.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdtree.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdtree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c index 47c44629d65..6db21ec14a6 100644 --- a/source/blender/blenlib/intern/BLI_kdtree.c +++ b/source/blender/blenlib/intern/BLI_kdtree.c @@ -132,7 +132,7 @@ void BLI_kdtree_balance(KDTree *tree) tree->root= kdtree_balance(tree->nodes, tree->totnode, 0); } -static float squared_distance(float *v2, float *v1, float *UNUSED(n1), float *n2) +static float squared_distance(const float v2[3], const float v1[3], float *UNUSED(n1), float *n2) { float d[3], dist; @@ -143,8 +143,11 @@ static float squared_distance(float *v2, float *v1, float *UNUSED(n1), float *n2 dist = dot_v3v3(d, d); //if(n1 && n2 && (dot_v3v3(n1, n2) < 0.0f)) - if(n2 && (dot_v3v3(d, n2) < 0.0f)) + + /* can someone explain why this is done?*/ + if(n2 && (dot_v3v3(d, n2) < 0.0f)) { dist *= 10.0f; + } return dist; } |