diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-03-15 05:59:51 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-03-15 05:59:51 +0100 |
| commit | 45f74150dd79db5a162034ab0c43e6abdb83beea (patch) | |
| tree | 1d9f5af88c574c75117a47992302bab70f0999b6 /src/Size.cs | |
| parent | 20ce11875dc27c7399e3f5bf2a060e2c7cbeaad7 (diff) | |
split graphic objects dirRearangeDirs
Diffstat (limited to 'src/Size.cs')
| -rw-r--r-- | src/Size.cs | 47 |
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) |