Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Incline of the line
- int dx = x2 - x1;
- int dy = y2 - y1;
- double k = (dx == 0) ? 0 : (dy / dx) * -1;
- this.incline = (int) Math.signum(k);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement