From 10d295decf53bec90de96c7663fdfcfc72adcaec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Thu, 30 May 2019 21:18:42 +0200 Subject: [PATCH] Use MathUtilities --- src/Avalonia.Controls/WrapPanel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/WrapPanel.cs b/src/Avalonia.Controls/WrapPanel.cs index b6215a28cc..86f1691e70 100644 --- a/src/Avalonia.Controls/WrapPanel.cs +++ b/src/Avalonia.Controls/WrapPanel.cs @@ -112,13 +112,13 @@ namespace Avalonia.Controls //this is the size of the child in UV space var sz = new UVSize(Orientation, child.DesiredSize.Width, child.DesiredSize.Height); - if ((curLineSize.U + sz.U) > uvConstraint.U) //need to switch to another line + if (MathUtilities.GreaterThan(curLineSize.U + sz.U, uvConstraint.U) //need to switch to another line { panelSize.U = Max(curLineSize.U, panelSize.U); panelSize.V += curLineSize.V; curLineSize = sz; - if (sz.U > uvConstraint.U) //the element is wider then the constrint - give it a separate line + if (MathUtilities.GreaterThan(sz.U, uvConstraint.U)) //the element is wider then the constrint - give it a separate line { panelSize.U = Max(sz.U, panelSize.U); panelSize.V += sz.V;