         return out;
     }
 
-    public static function mapPoint(
-        point:Point,
-        from:Rectangle, to:Rectangle,
-        out:Rectangle = null):Rectangle
-    {
-        if (!out) out = new Rectangle();
-        out.x = to.x + to.width * (point.x - from.x) / from.width;
-        out.y = to.y + to.height * (point.y - from.y) / from.height;
+    public static function mapPoint(point:Object,
+        source:Object, target:Object, out:Object = null):Object
+    {
+        if (!out) out = new Rectangle();
+        out.x = target.x + target.width * (point.x - source.x) / source.width;
+        out.y = target.y + target.height * (point.y - source.y) / source.height;
         return out;
     }
 
     public static function mapRect(
-        rect:Rectangle,
-        from:Rectangle, to:Rectangle,
-        out:Rectangle = null):Rectangle
-    {
-        if (!out) out = new Rectangle();
-        out.x = to.x + to.width * (rect.x - from.x) / from.width;
-        out.y = to.y + to.height * (rect.y - from.y) / from.height;
-        out.width = to.width * (rect.right - from.x) / from.width;
-        out.height = to.height * (rect.bottom - from.y) / from.height;
+        rect:Object, source:Object, target:Object, out:Object = null):Object
+    {
+        if (!out) out = new Rectangle();
+        out.x = target.x + target.width * (rect.x - source.x) / source.width;
+        out.y = target.y + target.height * (rect.y - source.y) / source.height;
+        out.width = target.width * (rect.right - source.x) / source.width;
+        out.height = target.height * (rect.bottom - source.y) / source.height;
         return out;
     }
 
     public static function clampPoint(
-        point:Point, rect:Rectangle, out:Point = null):Point
+        point:Object, rect:Object, out:Object = null):Object
     {
         if (!out) out = new Point();
 

    }

    public static function roundIn(
        rect:Rectangle, out:Rectangle = null):Rectangle
    {
        if (!out) out = new Rectangle();


public class RectUtil
{
    public static function multiply(
        rect:Object, factor:Number, out:Object = null):Object
    {
        if (!out) out = new Rectangle();
        out.x = rect.x * factor;
