0
/ 10
Given two Point
s p1
and p2
, return the slope of the line defined by the two points. If the line is vertical the slope is not defined and...
Given two Point
s p1
and p2
, return the
slope of the line defined by the two points.
If the line is vertical the slope is not defined
and your routine should return Double.NaN
.
Beware, integer division truncates the result.
Examples:
slope(new Point(10,10),new Point(100,100)) -> 1.0
Your feedback will appear here when you check your answer.