Beispiel #1
0
        public double AngleInDegreeWith(EuclidianVector v1)
        {
            var cosAngle       = ScalarProductWith(v1) / (Norm * v1.Norm);
            var angleInGradian = Math.Acos(cosAngle);
            var angleInDegree  = EuclidianTools.RadianToDegree(angleInGradian) % 360;

            if (angleInDegree > 180)
            {
                angleInDegree = -(360 - angleInDegree);
            }

            return(angleInDegree);
        }
Beispiel #2
0
 public double ScalarProductWith(EuclidianVector v1)
 {
     return(X * v1.X + Y * v1.Y);
 }