The ANGLE function determines the angle formed by a line passing through two points and the X WCS axis. To find the angle between two lines that may be at any orientation in 3D space define two unit vectors, v1 from from point 1 to point 2, and v2, from point 1 to point 3. Then take the arc-cosine of the dot product of the two vectors for the true angle.