Created
July 14, 2015 06:49
-
-
Save wackoisgod/f3652ed3c266236aee16 to your computer and use it in GitHub Desktop.
Some code for me
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
var x = new Point(3, 3); | |
var y = new Point(1, 2); | |
var x1 = y.X - x.X; | |
var y1 = y.Y - x.Y; | |
var scale = Math.Max(Math.Abs(x1), Math.Abs(y1)); | |
var direction = new Point(x1 / scale, y1 / scale); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment