Exemplo n.º 1
0
        /// <summary>
        /// Gets the squared distance from one point to another
        /// </summary>
        public long SqrDistanceTo( BigPoint3 pt )
        {
            long diffX = ( X - pt.X );
            long diffY = ( Y - pt.Y );
            long diffZ = ( Z - pt.Z );

            return ( diffX * diffX ) + ( diffY * diffY ) + ( diffZ * diffZ );
        }
Exemplo n.º 2
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 public BigPoint3( BigPoint3 src )
 {
     m_X = src.m_X;
     m_Y = src.m_Y;
     m_Z = src.m_Z;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the distance from on point to another
 /// </summary>
 /// <remarks>
 /// Because BigPoint3 has so much more precision than a float can offer, be careful about using this function
 /// </remarks>
 public float DistanceTo( BigPoint3 pt )
 {
     return Functions.Sqrt( SqrDistanceTo( pt ) );
 }