Skip to content

Commit

Permalink
Fixed #635: LineSegment: from/to aliases start/end
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Nov 18, 2023
1 parent 7118718 commit b06ed12
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ final case class LineSegment(start: Vertex, end: Vertex) derives CanEqual:
((end.y - start.y) / 2) + start.y
)

lazy val from: Vertex = start
lazy val to: Vertex = end

def left: Double = Math.min(start.x, end.x)
def right: Double = Math.max(start.x, end.x)
def top: Double = Math.min(start.y, end.y)
Expand Down

0 comments on commit b06ed12

Please sign in to comment.