From fda7d8768a00837289cae585915488e6b2f57162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Sun, 1 Jan 2023 20:08:41 +0000 Subject: [PATCH] Fix HaveZero condition --- UVtools.Core/Extensions/SizeExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UVtools.Core/Extensions/SizeExtensions.cs b/UVtools.Core/Extensions/SizeExtensions.cs index cfa922a..5fda514 100644 --- a/UVtools.Core/Extensions/SizeExtensions.cs +++ b/UVtools.Core/Extensions/SizeExtensions.cs @@ -73,7 +73,7 @@ public static class SizeExtensions /// /// /// - public static bool HaveZero(this Size size) => size.Width <= 0 && size.Height <= 0; + public static bool HaveZero(this Size size) => size.Width <= 0 || size.Height <= 0; /// /// Exchange width with height @@ -96,7 +96,7 @@ public static class SizeExtensions /// /// /// - public static bool HaveZero(this SizeF size) => size.Width <= 0 && size.Height <= 0; + public static bool HaveZero(this SizeF size) => size.Width <= 0 || size.Height <= 0; public static float Area(this SizeF size, int round = -1) => round >= 0 ? (float)Math.Round(size.Width * size.Height, round) : size.Width * size.Height;