inflate method
Returns a new LineSegment with same direction but extended by amount
on both sides.
Implementation
LineSegment inflate(double amount) {
final direction = this.direction;
return LineSegment(from - direction * amount, to + direction * amount);
}