Advertisement
SirBaconBitz

slopePoint

Dec 19th, 2017
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.18 KB | None | 0 0
  1. public double slope(Point other) throws IllegalArgumentException {
  2.     if (x == other.x && y == other.y) throw new IllegalArgumentException();
  3.     return (other.y - y) / (other.x - x);
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement