diff --git a/files/en-us/games/techniques/3d_collision_detection/index.md b/files/en-us/games/techniques/3d_collision_detection/index.md index 7dc20922f620f7b..34cd7bb078264bb 100644 --- a/files/en-us/games/techniques/3d_collision_detection/index.md +++ b/files/en-us/games/techniques/3d_collision_detection/index.md @@ -90,8 +90,8 @@ function isPointInsideSphere(point, sphere) { // we are using multiplications because is faster than calling Math.pow const distance = Math.sqrt( (point.x - sphere.x) * (point.x - sphere.x) + - (point.y - sphere.y) * (point.y - sphere.y) + - (point.z - sphere.z) * (point.z - sphere.z), + (point.y - sphere.y) * (point.y - sphere.y) + + (point.z - sphere.z) * (point.z - sphere.z) ); return distance < sphere.radius; }