2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-04 12:35:52 +00:00

CBallCamera: Use bool instead of float for holding boolean value

Using a float is very suspect and also more expensive in terms of
code-gen to access and modify the variable.
This commit is contained in:
Lioncash 2019-10-12 02:22:10 -04:00
parent c4ecf972f5
commit 21c1ed2940

View File

@ -1750,7 +1750,8 @@ bool CBallCamera::DetectCollision(const zeus::CVector3f& from, const zeus::CVect
zeus::CVector3f delta = to - from; zeus::CVector3f delta = to - from;
float deltaMag = delta.magnitude(); float deltaMag = delta.magnitude();
zeus::CVector3f deltaNorm = delta * (1.f / deltaMag); zeus::CVector3f deltaNorm = delta * (1.f / deltaMag);
float clear = true; bool clear = true;
if (deltaMag > 0.000001f) { if (deltaMag > 0.000001f) {
float margin = 2.f * radius; float margin = 2.f * radius;
zeus::CAABox aabb; zeus::CAABox aabb;