Merge with trunk r37546
[blender.git] / source / blender / blenkernel / intern / bvhutils.c
index f49f1aea0b85663e01e18568e448d8e645d52eae..fa6a8239282338fef71845220e7f06717ace9480 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);
-       dist = len_v3v3(nearest_tmp, (float*)co);
+       dist = len_squared_v3v3(nearest_tmp, (float*)co);
        
        if(dist < nearest->dist)
        {