/*
  Lars Englund 2002-05
*/
#include "../inc/geometry/geometry.h"

/* Check to see if a sphere overlaps another sphere */
const bool SphereSphereIntersect( const class Sphere &A, const class Sphere &B )
{ 
  float s, d = 0; 
  /* Find the square of the distance from the sphere to the box */
  for( long i=0 ; i<3 ; i++ ) 
  { 
    s = A.center[i] - B.center[i];
    d += s*s;
  }
  return d <= square(A.radius+B.radius);
}

