Calculate the y intercept for the given point and slope.
(point: Point, slope: number)
| 69 | |
| 70 | /** Calculate the y intercept for the given point and slope. */ |
| 71 | function getYIntercept(point: Point, slope: number) { |
| 72 | return point.y - slope * point.x; |
| 73 | } |
| 74 | |
| 75 | /** Represents a coordinate of mouse travel. */ |
| 76 | type Point = {x: number; y: number}; |