Calculate the slope between point a and b.
(a: Point, b: Point)
| 64 | |
| 65 | /** Calculate the slope between point a and b. */ |
| 66 | function getSlope(a: Point, b: Point) { |
| 67 | return (b.y - a.y) / (b.x - a.x); |
| 68 | } |
| 69 | |
| 70 | /** Calculate the y intercept for the given point and slope. */ |
| 71 | function getYIntercept(point: Point, slope: number) { |