slope property
Get slope of this line
The slope of a line is defined as the change in y coordinate with respect to the change in x coordinate of that line.
Implementation
double get slope {
final dx = b.x - a.x;
if (dx == 0) {
return (b.y - a.y) >= 0 ? double.infinity : double.negativeInfinity;
}
return (b.y - a.y) / dx;
}