mirror of https://github.com/raysan5/raylib
Make code a bit clearer for beginners
This commit is contained in:
parent
46bac0ba2c
commit
a2ed65aa14
|
@ -2487,7 +2487,7 @@ bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, floa
|
|||
*/
|
||||
|
||||
// Check for distances squared to avoid sqrtf()
|
||||
collision = (Vector3DotProduct(Vector3Subtract(centerB, centerA), Vector3Subtract(centerB, centerA)) <= (radiusA + radiusB)*(radiusA + radiusB));
|
||||
if (Vector3DotProduct(Vector3Subtract(centerB, centerA), Vector3Subtract(centerB, centerA)) <= (radiusA + radiusB)*(radiusA + radiusB)) collision = true;
|
||||
|
||||
return collision;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue