Example #1
0
//returns an AABB that holds both a and v.
func Expand(a AABB, v vect.Vect) AABB {
	return AABB{
		vect.Min(a.Lower, v),
		vect.Max(a.Upper, v),
	}
}
Example #2
0
//returns an AABB that holds both a and b.
func CombinePtr(a, b *AABB) AABB {
	return AABB{
		vect.Min(a.Lower, b.Lower),
		vect.Max(a.Upper, b.Upper),
	}
}