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)); }
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; }
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); }
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)); }