예제 #1
0
 public static bool GreaterThanOrClose(double value1, double value2)
 {
     return(value1 > value2 || DoubleUtil.AreClose(value1, value2));
 }
예제 #2
0
        //public static bool AreClose(Point point1, Point point2)
        //{
        //    return DoubleUtil.AreClose(point1.X, point2.X) && DoubleUtil.AreClose(point1.Y, point2.Y);
        //}

        //public static bool AreClose(Size size1, Size size2)
        //{
        //    return DoubleUtil.AreClose(size1.Width, size2.Width) && DoubleUtil.AreClose(size1.Height, size2.Height);
        //}

        //public static bool AreClose(Vector vector1, Vector vector2)
        //{
        //    return DoubleUtil.AreClose(vector1.X, vector2.X) && DoubleUtil.AreClose(vector1.Y, vector2.Y);
        //}

        //public static bool AreClose(Rect rect1, Rect rect2)
        //{
        //    if (rect1.IsEmpty)
        //    {
        //        return rect2.IsEmpty;
        //    }
        //    return !rect2.IsEmpty && DoubleUtil.AreClose(rect1.X, rect2.X) && DoubleUtil.AreClose(rect1.Y, rect2.Y) && DoubleUtil.AreClose(rect1.Height, rect2.Height) && DoubleUtil.AreClose(rect1.Width, rect2.Width);
        //}

        public static bool IsBetweenZeroAndOne(double val)
        {
            return(DoubleUtil.GreaterThanOrClose(val, 0.0) && DoubleUtil.LessThanOrClose(val, 1.0));
        }
예제 #3
0
 public static bool LessThanOrClose(double value1, double value2)
 {
     return(value1 < value2 || DoubleUtil.AreClose(value1, value2));
 }