diff options
Diffstat (limited to 'source/blender/blenlib/BLI_float2.hh')
-rw-r--r-- | source/blender/blenlib/BLI_float2.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_float2.hh b/source/blender/blenlib/BLI_float2.hh index d41c4d262d3..2a5320e4c35 100644 --- a/source/blender/blenlib/BLI_float2.hh +++ b/source/blender/blenlib/BLI_float2.hh @@ -141,7 +141,8 @@ struct float2 { static float distance_squared(const float2 &a, const float2 &b) { - return float2::dot(a, b); + float2 diff = a - b; + return float2::dot(diff, diff); } struct isect_result { |