Skip to content

Commit

Permalink
NewRect variable names (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
dasnellings authored Jul 8, 2021
1 parent 9e6c99a commit a21ffc1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions point.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ type Rect struct {
}

// NewRect creates a new rectangle
func NewRect(left, top, bottom, right int16) Rect {
return Rect{Min: At(left, top), Max: At(bottom, right)}
// left,top,right,bottom correspond to x1,y1,x2,y2
func NewRect(left, top, right, bottom int16) Rect {
return Rect{Min: At(left, top), Max: At(right, bottom)}
}

// Contains returns whether a point is within the rectangle or not.
Expand Down

0 comments on commit a21ffc1

Please sign in to comment.