init?(start: Coordinate, direction: Direction, distance: Distance) { guard let end = start + direction.interval(of: distance) else { return nil } self.start = start self.end = end self.direction = direction self.distance = distance }
switch
の二回の分岐が Direction.interval
の一回にまとめられそうだし、