Created
August 30, 2020 18:09
-
-
Save collinticer/f53b533df826fa885d2fbe21eb7c778b 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
function eight_point_direction( degDirection ) { | |
return round( degDirection / 45 ); | |
} | |
function eight_point_coord_direction( xFirst, yFirst, xSecond, ySecond ) { | |
var tmpDirection = point_direction( xFirst, yFirst, xSecond, ySecond ); | |
return eight_point_direction( tmpDirection ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment