Exemplo 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;
        }
Exemplo n.º 2
0
 private static Vector2r ToVec(Bound bound) {
     return new Vector2r(bound.X, bound.Z);
 }