Created
April 12, 2018 09:28
-
-
Save carolina-vallejo/bfc7bb53ea98bd8cb3f39987998961f0 to your computer and use it in GitHub Desktop.
midpoint calculation between two coordinates middle point
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
function midpoint(x1, y1, x2, y2, per) { | |
return [x1 + (x2 - x1) * per, y1 + (y2 - y1) * per]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment