1be8156e5ec85fdf420370e71736ef001d264fe3
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / FreeFormEditing / DoubleExtensions.cs
1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------
4
5 namespace System.Activities.Presentation.FreeFormEditing
6 {
7     using System;
8     using System.Windows;
9
10     internal static class DoubleExtensions
11     {
12         public static bool IsEqualTo(this double a, double b)
13         {
14             return Math.Abs(a - b) < DesignerGeometryHelper.EPS;
15         }
16
17         public static bool IsNoGreaterThan(this double a, double b)
18         {
19             return a <= b + DesignerGeometryHelper.EPS;
20         }
21
22         public static bool IsNoLessThan(this double a, double b)
23         {
24             return a >= b - DesignerGeometryHelper.EPS;
25         }
26     }
27 }