Math: Add M_SQRT3 constant, fix sphere radius calculations
Former-commit-id: 71ac4d3522f427fda60a0e71d76eca7558539187
This commit is contained in:
@@ -400,7 +400,7 @@ m_radius(radius)
|
||||
|
||||
NzBoxf NzSphereGeom::ComputeAABB(const NzMatrix4f& offsetMatrix, const NzVector3f& scale) const
|
||||
{
|
||||
NzVector3f size(m_radius * scale);
|
||||
NzVector3f size(m_radius * M_SQRT3 * scale);
|
||||
NzVector3f position(offsetMatrix.GetTranslation());
|
||||
|
||||
return NzBoxf(position - size, position + size);
|
||||
|
||||
Reference in New Issue
Block a user