CADability dotNET
Determins, whether the directions of the given vectors are almost identical, i.e. the angular difference is less than epsa.

Namespace: CADability
Assembly: CADability (in CADability.dll) Version: 1.1.4254.24737 (1.1.*)

Syntax

C#
public static bool SameDirection(
	GeoVector2D v1,
	GeoVector2D v2,
	bool VectorsAreNormalized
)
Visual Basic
Public Shared Function SameDirection ( _
	v1 As GeoVector2D, _
	v2 As GeoVector2D, _
	VectorsAreNormalized As Boolean _
) As Boolean
Visual C++
public:
static bool SameDirection(
	GeoVector2D v1, 
	GeoVector2D v2, 
	bool VectorsAreNormalized
)

Parameters

v1
Type: CADability..::..GeoVector2D
first vector
v2
Type: CADability..::..GeoVector2D
second vector
VectorsAreNormalized
Type: System..::..Boolean
true, if the vectors are already normalized, false if not or unknown

Return Value

true: almost same direction, false: different directions

See Also