YIntercept calculates the Y-Intercept of a line from a specific Point.
(p *Point, slope float64)
| 35 | |
| 36 | // YIntercept calculates the Y-Intercept of a line from a specific Point. |
| 37 | func YIntercept(p *Point, slope float64) float64 { |
| 38 | return p.Y - (slope * p.X) |
| 39 | } |
| 40 | |
| 41 | // IsParallel checks if two lines are parallel or not. |
| 42 | func IsParallel(l1, l2 *Line) bool { |
no outgoing calls