aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Size.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-03-15 05:59:51 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2017-03-15 05:59:51 +0100
commit45f74150dd79db5a162034ab0c43e6abdb83beea (patch)
tree1d9f5af88c574c75117a47992302bab70f0999b6 /src/Size.cs
parent20ce11875dc27c7399e3f5bf2a060e2c7cbeaad7 (diff)
split graphic objects dirRearangeDirs
Diffstat (limited to 'src/Size.cs')
-rw-r--r--src/Size.cs47
1 files changed, 28 insertions, 19 deletions
diff --git a/src/Size.cs b/src/Size.cs
index 47288b06..c73370e4 100644
--- a/src/Size.cs
+++ b/src/Size.cs
@@ -99,6 +99,18 @@ namespace Crow
else
return false;
}
+ public static bool operator <(Size s1, Size s2)
+ {
+ if (s1.Width < s2.Width)
+ if (s1.Height <= s2.Height)
+ return true;
+ else
+ return false;
+ else if (s1.Width == s2.Width && s1.Height < s2.Height)
+ return true;
+
+ return false;
+ }
public static bool operator >=(Size s1, Size s2)
{
if (s1.Width >= s2.Width && s1.Height >= s2.Height)
@@ -106,18 +118,13 @@ namespace Crow
else
return false;
}
- public static bool operator <(Size s1, Size s2)
- {
- if (s1.Width < s2.Width)
- if (s1.Height <= s2.Height)
- return true;
- else
- return false;
- else if (s1.Width == s2.Width && s1.Height < s2.Height)
- return true;
-
- return false;
- }
+ public static bool operator <=(Size s1, Size s2)
+ {
+ if (s1.Width <= s2.Width && s1.Height <= s2.Height)
+ return true;
+ else
+ return false;
+ }
public static bool operator <(Size s, int i)
{
return s.Width < i && s.Height < i ? true : false;
@@ -126,13 +133,15 @@ namespace Crow
{
return s.Width <= i && s.Height <= i ? true : false;
}
- public static bool operator <=(Size s1, Size s2)
- {
- if (s1.Width <= s2.Width && s1.Height <= s2.Height)
- return true;
- else
- return false;
- }
+ public static bool operator >(Size s, int i)
+ {
+ return s.Width > i && s.Height > i ? true : false;
+ }
+ public static bool operator >=(Size s, int i)
+ {
+ return s.Width >= i && s.Height >= i ? true : false;
+ }
+
public static bool operator ==(Size s, int i)
{
if (s.Width == i && s.Height == i)