Fix BoundingRect
This commit is contained in:
parent
261e1a8ac0
commit
77eef2f756
1 changed files with 2 additions and 5 deletions
|
@ -72,12 +72,9 @@ func (b Box) Canon() Box {
|
|||
}
|
||||
|
||||
// BoundingRect returns an image.Rectangle that bounds the box if it were
|
||||
// projected, i.e. Rectangle{Min: π(Min), Max: π(Max)}.
|
||||
// projected.
|
||||
func (b Box) BoundingRect(π IntProjection) image.Rectangle {
|
||||
return image.Rectangle{
|
||||
Min: π.Project(b.Min),
|
||||
Max: π.Project(b.Max),
|
||||
}
|
||||
return b.Back(π).Union(b.Front(π))
|
||||
}
|
||||
|
||||
// Back returns an image.Rectangle representing the back of the box, using
|
||||
|
|
Loading…
Reference in a new issue