From 631d173b72107fbc0fb06558eb8e3b8f3232259f Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sun, 18 Feb 2018 19:31:13 +1100 Subject: [PATCH] use DistanceSquared --- .../Processors/Dithering/PaletteDitherProcessorBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs b/src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs index b3c564edbd..4e6b7bec0e 100644 --- a/src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs +++ b/src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs @@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing.Processors for (int index = 0; index < colorPalette.Length; index++) { TPixel temp = colorPalette[index]; - float distance = Vector4.Distance(vector, temp.ToVector4()); + float distance = Vector4.DistanceSquared(vector, temp.ToVector4()); if (distance < leastDistance) {