svn merge -r37335:37500 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / blenkernel / intern / bvhutils.c
index 941f377ab420585ba5ff26035283578dbeca244d..f09d955033d39512b01f0ced4cfe84827efbdbd6 100644 (file)
@@ -493,7 +493,7 @@ static void mesh_edges_nearest_point(void *userdata, int index, const float *co,
        
        // NOTE: casts to "float*" here are due to co being "const float*"
        closest_to_line_segment_v3(nearest_tmp, (float*)co, t0, t1);
        
        // NOTE: casts to "float*" here are due to co being "const float*"
        closest_to_line_segment_v3(nearest_tmp, (float*)co, t0, t1);
-       dist = len_v3v3(nearest_tmp, (float*)co);
+       dist = len_squared_v3v3(nearest_tmp, (float*)co);
        
        if(dist < nearest->dist)
        {
        
        if(dist < nearest->dist)
        {