Math-Get Angle between two vectors

From Vectorlab

Revision as of 10:22, 17 May 2009 by Orso (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search


Returns the angle between two vectors. By Orso B. Schmid


{ Orso ***************************** }
{ returns the angle between two vectors }
FUNCTION M_GetAngle2Vec(v1, v2: VECTOR): REAL;
    BEGIN
        M_GetAngle2Vec := Rad2Deg(ArcCos(DotProduct(
            UnitVec(v1), UnitVec(v2)
            )));
    END;
Personal tools