Browse Source

Fixed Rect.Centered

Mark Sibly 9 years ago
parent
commit
a848ba74f1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/std/geom/rect.monkey2

+ 2 - 2
modules/std/geom/rect.monkey2

@@ -311,8 +311,8 @@ Struct Rect<T>
 	#rem monkeydoc Gets the rect centered within another rect.
 	#end 
 	Method Centered:Rect( r:Rect )
-		Local x:=(r.Width-Width)/2+min.x
-		Local y:=(r.Height-Height)/2+min.y
+		Local x:=(r.Width-Width)/2+r.min.x
+		Local y:=(r.Height-Height)/2+r.min.y
 		Return New Rect( x,y,x+Width,y+Height )
 	End