Created
January 29, 2010 10:49
-
-
Save slaskis/289639 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function localToLocal( containerFrom : DisplayObject, containerTo : DisplayObject, origin : Point = null ) : Point { | |
var point : Point = origin ? origin : new Point( ); | |
point = containerFrom.localToGlobal( point ); | |
point = containerTo.globalToLocal( point ); | |
return point; | |
} | |
function getZoomScale( min , max , step = 0 , steps = 3 ) { | |
var diff = max - min; | |
if( step == 0 ) | |
return min; | |
if( step == steps ) | |
return max; | |
return diff / ( 2 * ( steps - step ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment