Function areAntiParallel

Returns true if the given vectors point in the opposite direction.

  • Parameters

    • vA: Vector
    • vB: Vector
    • angleDiffThreshold: number = 0

      Sets the threshold in degrees when comparing the angles of two vectors. E.g. for 5 degrees threshold, directions whose vectors are within 175-185 degrees of each other are considered antiparallel. It doesn't make sense for this value to be < 0 or >= 90 degrees. If it is, it's forced to be positive (absolute) and <= 89.99.

    Returns boolean