Calculate the slope between two points.
(from: Point, to: Point)
| 92 | |
| 93 | /** Calculate the slope between two points. */ |
| 94 | function getSlope(from: Point, to: Point) { |
| 95 | return (to.y - from.y) / (to.x - from.x); |
| 96 | } |
| 97 | |
| 98 | /** Calculate the y intercept based on some slope and point. */ |
| 99 | function getYIntercept(slope: number, point: Point) { |
no outgoing calls
no test coverage detected
searching dependent graphs…