From c0833989210714bc6974b77f40e59edc47d0cc68 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 11 Jan 2021 14:58:29 +0100 Subject: BLI: fix math operation That fixes a stupid mistake of mine that was copied a couple of times. --- source/blender/blenlib/BLI_float2.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib/BLI_float2.hh') 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 { -- cgit v1.2.3