Example #1
0
        public bool isParallel(AwVector otherVector, double tolerance)
        {
            AwVector v1, v2;

            v1 = normal();
            v2 = otherVector.normal();
            double dotPrd = v1.dotProduct(v2);

            return(AwMath.equivalent(Math.Abs(dotPrd), (double)1.0, tolerance));
        }
Example #2
0
 public double angle(AwVector vec)
 {
     double cosine = normal().dotProduct(vec.normal());
     double angle;
     if (cosine >= 1.0)
         angle = 0.0;
     else if (cosine <= -1.0)
         angle = AwMath.kPi;
     else
         angle = Math.Acos(cosine);
     return angle;
 }
Example #3
0
        public double angle(AwVector vec)
        {
            double cosine = normal().dotProduct(vec.normal());
            double angle;

            if (cosine >= 1.0)
            {
                angle = 0.0;
            }
            else if (cosine <= -1.0)
            {
                angle = AwMath.kPi;
            }
            else
            {
                angle = Math.Acos(cosine);
            }
            return(angle);
        }
Example #4
0
 public bool isParallel( AwVector otherVector, double tolerance)
 {
     AwVector v1, v2;
     v1 = normal();
     v2 = otherVector.normal();
     double dotPrd = v1.dotProduct(v2);
     return (AwMath.equivalent( Math.Abs(dotPrd), (double) 1.0, tolerance));
 }