Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
79814069
Commit
79814069
authored
May 20, 2010
by
Roger Peppe
Committed by
Robert Griesemer
May 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rectangle.Canon()
R=rsc, r, gri CC=golang-dev
https://golang.org/cl/1239043
parent
efda3aba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
arith.go
src/pkg/exp/draw/arith.go
+2
-2
No files found.
src/pkg/exp/draw/arith.go
View file @
79814069
...
@@ -59,10 +59,10 @@ func (r Rectangle) Sub(p Point) Rectangle { return Rectangle{r.Min.Sub(p), r.Max
...
@@ -59,10 +59,10 @@ func (r Rectangle) Sub(p Point) Rectangle { return Rectangle{r.Min.Sub(p), r.Max
// has Min.X <= Max.X and Min.Y <= Max.Y.
// has Min.X <= Max.X and Min.Y <= Max.Y.
func
(
r
Rectangle
)
Canon
()
Rectangle
{
func
(
r
Rectangle
)
Canon
()
Rectangle
{
if
r
.
Max
.
X
<
r
.
Min
.
X
{
if
r
.
Max
.
X
<
r
.
Min
.
X
{
r
.
M
ax
.
X
=
r
.
Min
.
X
r
.
M
in
.
X
,
r
.
Max
.
X
=
r
.
Max
.
X
,
r
.
Min
.
X
}
}
if
r
.
Max
.
Y
<
r
.
Min
.
Y
{
if
r
.
Max
.
Y
<
r
.
Min
.
Y
{
r
.
M
ax
.
Y
=
r
.
Min
.
Y
r
.
M
in
.
Y
,
r
.
Max
.
Y
=
r
.
Max
.
Y
,
r
.
Min
.
Y
}
}
return
r
return
r
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment