Multiplies a uniform, local scaling to the AABB (i.e. multiplying its extents as if it was centered at the origin)
(&mut self, scaling: R)
| 234 | |
| 235 | /// Multiplies a uniform, local scaling to the AABB (i.e. multiplying its extents as if it was centered at the origin) |
| 236 | pub fn scale_uniformly(&mut self, scaling: R) { |
| 237 | let center = self.centroid(); |
| 238 | self.translate(&(center * R::one().neg())); |
| 239 | self.min *= scaling; |
| 240 | self.max *= scaling; |
| 241 | self.translate(¢er); |
| 242 | } |
| 243 | |
| 244 | /// Enlarges this AABB to the smallest AABB enclosing both itself and another AABB |
| 245 | pub fn join(&mut self, other: &Self) { |