Esempio n. 1
0
        /// <summary>
        /// Returns true if this bound is either intersecting or colliding with the other bound.
        /// </summary>
        public bool Intersects(Bound other) {
            // TODO: optimize this function to avoid the sqrt
            Real centerDistances = Vector2r.Distance(X, Z, other.X, other.Z);
            Real range = Radius + other.Radius;

            return range >= centerDistances;
        }
 private static Vector2r ToVec(Bound bound) {
     return new Vector2r(bound.X, bound.Z);
 }