Exemplo n.º 1
0
        /// <summary>
        /// Returns the signed angle between two vectors.
        /// </summary>
        /// <param name="v0"></param>
        /// <param name="v1"></param>
        /// <param name="up"></param>
        /// <returns></returns>
        public static float SignedAngle(Vector3f v0, Vector3f v1, Vector3f up)
        {
            var c = Cross(v0, v1);

            return(SlurMath.Atan2(c.Length * Math.Sign(Dot(c, up)), Dot(v0, v1)));
        }