Esempio n. 1
0
        public static Angle FromDirectionVector(Vector vec)
        {
            var dirVec = vec.Length == 1 ? vec : vec.Normalized;

            return(FromRadians(MathP.Atan2(dirVec.Y, dirVec.X)));
        }
Esempio n. 2
0
        public static Angle FromPoints(Vector v1, Vector v2)
        {
            var dirVec = (v2 - v1).Normalized;

            return(FromRadians(MathP.Atan2(dirVec.Y, dirVec.X)));
        }