Created
June 15, 2012 19:27
-
-
Save mattlundstrom/2938314 to your computer and use it in GitHub Desktop.
Flash Interpoint
This file contains 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
function calulateInterpoint(p1:Point,p2:Point,percent:Number ):Point | |
{ | |
var temporaryPoint:Point = new Point; | |
temporaryPoint.x = p1.x + ( p2.x - p1.x ) / (100/percent) | |
temporaryPoint.y = p1.y + ( p2.y - p1.y ) / (100/percent) | |
return temporaryPoint; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment