Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.14 KB | None | 0 0
  1. //Incline of the line
  2. int dx = x2 - x1;
  3. int dy = y2 - y1;
  4. double k = (dx == 0) ? 0 : (dy / dx) * -1;
  5. this.incline = (int) Math.signum(k);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement