forked from StrafesNET/strafe-project
common: aabb: use midpoint for center
This commit is contained in:
parent
3d203e2da9
commit
651150760c
@ -46,7 +46,7 @@ impl Aabb{
|
||||
self.max-self.min
|
||||
}
|
||||
pub fn center(&self)->Planar64Vec3{
|
||||
self.min+(self.max-self.min)>>1
|
||||
self.min.map_zip(self.max,|(min,max)|min.midpoint(max))
|
||||
}
|
||||
//probably use floats for area & volume because we don't care about precision
|
||||
// pub fn area_weight(&self)->f32{
|
||||
|
Loading…
x
Reference in New Issue
Block a user