Table of Contents

Method IsCodirectional

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

IsCodirectional(GeoVector3, GeoVector3)

Checks whether two vectors point the same way, using the default tolerance.

public static bool IsCodirectional(GeoVector3 v1, GeoVector3 v2)

Parameters

v1 GeoVector3
v2 GeoVector3

Returns

bool

IsCodirectional(GeoVector3, GeoVector3, Tolerance)

Checks whether two vectors point the same way, within an angular tolerance.

public static bool IsCodirectional(GeoVector3 v1, GeoVector3 v2, Tolerance tolerance)

Parameters

v1 GeoVector3
v2 GeoVector3
tolerance Tolerance

Returns

bool

Remarks

This is IsParallel(GeoVector3, GeoVector3, Tolerance) with the anti-parallel case excluded, which is the question to ask when comparing surface normals or travel directions.