@@ -233,8 +233,8 @@ public bool IsEmpty
233233 /// </param>
234234 public static bool operator == ( RRect left , RRect right )
235235 {
236- if ( Math . Abs ( left . X - ( double ) right . X ) < 0.001 && Math . Abs ( left . Y - ( double ) right . Y ) < 0.001 && Math . Abs ( left . Width - ( double ) right . Width ) < 0.001 )
237- return Math . Abs ( left . Height - ( double ) right . Height ) < 0.001 ;
236+ if ( Math . Abs ( left . X - right . X ) < 0.001 && Math . Abs ( left . Y - right . Y ) < 0.001 && Math . Abs ( left . Width - right . Width ) < 0.001 )
237+ return Math . Abs ( left . Height - right . Height ) < 0.001 ;
238238 else
239239 return false ;
240240 }
@@ -289,8 +289,8 @@ public override bool Equals(object obj)
289289 if ( ! ( obj is RRect ) )
290290 return false ;
291291 var rectangleF = ( RRect ) obj ;
292- if ( Math . Abs ( rectangleF . X - ( double ) X ) < 0.001 && Math . Abs ( rectangleF . Y - ( double ) Y ) < 0.001 && Math . Abs ( rectangleF . Width - ( double ) Width ) < 0.001 )
293- return Math . Abs ( rectangleF . Height - ( double ) Height ) < 0.001 ;
292+ if ( Math . Abs ( rectangleF . X - X ) < 0.001 && Math . Abs ( rectangleF . Y - Y ) < 0.001 && Math . Abs ( rectangleF . Width - Width ) < 0.001 )
293+ return Math . Abs ( rectangleF . Height - Height ) < 0.001 ;
294294 else
295295 return false ;
296296 }
@@ -307,8 +307,8 @@ public override bool Equals(object obj)
307307 /// <param name="y">The y-coordinate of the point to test. </param>
308308 public bool Contains ( double x , double y )
309309 {
310- if ( X <= ( double ) x && x < X + ( double ) Width && Y <= ( double ) y )
311- return y < Y + ( double ) Height ;
310+ if ( X <= x && x < X + Width && Y <= y )
311+ return y < Y + Height ;
312312 else
313313 return false ;
314314 }
@@ -342,8 +342,8 @@ public bool Contains(RPoint pt)
342342 /// </param>
343343 public bool Contains ( RRect rect )
344344 {
345- if ( X <= ( double ) rect . X && rect . X + ( double ) rect . Width <= X + ( double ) Width && Y <= ( double ) rect . Y )
346- return rect . Y + ( double ) rect . Height <= Y + ( double ) Height ;
345+ if ( X <= rect . X && rect . X + rect . Width <= X + Width && Y <= rect . Y )
346+ return rect . Y + rect . Height <= Y + Height ;
347347 else
348348 return false ;
349349 }
@@ -425,7 +425,7 @@ public static RRect Intersect(RRect a, RRect b)
425425 double num1 = Math . Min ( a . X + a . Width , b . X + b . Width ) ;
426426 double y = Math . Max ( a . Y , b . Y ) ;
427427 double num2 = Math . Min ( a . Y + a . Height , b . Y + b . Height ) ;
428- if ( num1 >= ( double ) x && num2 >= ( double ) y )
428+ if ( num1 >= x && num2 >= y )
429429 return new RRect ( x , y , num1 - x , num2 - y ) ;
430430 else
431431 return Empty ;
@@ -440,8 +440,8 @@ public static RRect Intersect(RRect a, RRect b)
440440 /// <param name="rect">The rectangle to test. </param>
441441 public bool IntersectsWith ( RRect rect )
442442 {
443- if ( rect . X < X + ( double ) Width && X < rect . X + ( double ) rect . Width && rect . Y < Y + ( double ) Height )
444- return Y < rect . Y + ( double ) rect . Height ;
443+ if ( rect . X < X + Width && X < rect . X + rect . Width && rect . Y < Y + Height )
444+ return Y < rect . Y + rect . Height ;
445445 else
446446 return false ;
447447 }
0 commit comments