Ejemplo n.º 1
0
        // This calculates the angle
        public float GetAngleZ()
        {
            Vector2D xy = new Vector2D(x, y);

            // Calculate and return the angle
            return((float)Math.Atan2(xy.GetLength(), z) + Angle2D.PIHALF);           //mxd // (float)Math.PI * 0.5f;
        }
Ejemplo n.º 2
0
        // This returns the distance between two points
        public static float Distance(Vector2D a, Vector2D b)
        {
            Vector2D d = a - b;

            return(d.GetLength());
        }