From 51afefbfc88ea362c3cb865be983624314204502 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 11 Dec 2021 00:38:28 +0100 Subject: [PATCH] removed unnecessary Math.Abs from Color.Invert --- MLEM/Extensions/ColorExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM/Extensions/ColorExtensions.cs b/MLEM/Extensions/ColorExtensions.cs index 2c5abbe..5fee79d 100644 --- a/MLEM/Extensions/ColorExtensions.cs +++ b/MLEM/Extensions/ColorExtensions.cs @@ -24,7 +24,7 @@ namespace MLEM.Extensions { /// The color to invert /// The inverted color public static Color Invert(this Color color) { - return new Color(Math.Abs(255 - color.R), Math.Abs(255 - color.G), Math.Abs(255 - color.B), color.A); + return new Color(255 - color.R, 255 - color.G, 255 - color.B, color.A); } }