 	    return pt1;
 	}
 
-		
 	/**
 	 *  @param bounds width and height to be transformed.
 	 *  @param matrix The transfomration matrix. 

		}
	}

    public static function applyTransforms(target:DisplayObject, matrix:Matrix = null, 
                                                x:Number = NaN, y:Number = NaN,
                                                scaleX:Number = NaN, scaleY:Number = NaN,
                                                rotation:Number = NaN,
                                                transformX:Number = NaN, transformY:Number = NaN):void
    {
        if (matrix == null)
        {
            var newX:Number = !isNaN(x) ? x : target.x;
            var newY:Number = !isNaN(y) ? y : target.y;
            var newScaleX:Number = !isNaN(scaleX) ? scaleX : target.scaleX;
            var newScaleY:Number = !isNaN(scaleY) ? scaleY : target.scaleY;
            var newRotation:Number = !isNaN(rotation) ? rotation : target.rotation;
            transformX = isNaN(transformX) ? 0 : transformX;
            transformY = isNaN(transformY) ? 0 : transformY;
			target.transform.matrix = composeMatrix(newX, newY, newScaleX, newScaleY, newRotation, transformX, transformY);
		}
		else
		{
			target.transform.matrix = matrix;
		}
	} 
		
	public static function rotationInRadians(value:Number):Number
	{
		return value / 180 * Math.PI;
	}

    
    /**
     *  @return Returns the union of <code>rect</code> and
     *  <code>Rectangle(left, top, right - left, bottom - top)</code>.

        m.translate(-transformX, -transformY);
        m.scale(scaleX, scaleY);
        if (rotation != 0) 
            m.rotate(rotation / 180 * Math.PI);
        m.translate(transformX + x, transformY + y);
        return m;
    }
