Table of Contents

Method IsParallel

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

IsParallel(GeoVector2, GeoVector2)

Checks whether two vectors are parallel (or anti-parallel) using default tolerance.

public static bool IsParallel(GeoVector2 v1, GeoVector2 v2)

Parameters

v1 GeoVector2

The first vector.

v2 GeoVector2

The second vector.

Returns

bool

true if the vectors are parallel; otherwise, false.

IsParallel(GeoVector2, GeoVector2, Tolerance)

Checks whether two vectors are parallel (or anti-parallel) within angular tolerance.

public static bool IsParallel(GeoVector2 v1, GeoVector2 v2, Tolerance tolerance)

Parameters

v1 GeoVector2

The first vector.

v2 GeoVector2

The second vector.

tolerance Tolerance

The tolerance containing the angular threshold in radians.

Returns

bool

true if the vectors are parallel within tolerance; otherwise, false.

IsParallel(GeoLine2, GeoLine2)

Checks whether two line segments are parallel using default tolerance.

public static bool IsParallel(GeoLine2 line1, GeoLine2 line2)

Parameters

line1 GeoLine2

The first line segment.

line2 GeoLine2

The second line segment.

Returns

bool

true if the line segments are parallel; otherwise, false.

IsParallel(GeoLine2, GeoLine2, Tolerance)

Checks whether two line segments are parallel within angular tolerance.

public static bool IsParallel(GeoLine2 line1, GeoLine2 line2, Tolerance tolerance)

Parameters

line1 GeoLine2

The first line segment.

line2 GeoLine2

The second line segment.

tolerance Tolerance

The tolerance.

Returns

bool

true if the line segments are parallel within tolerance; otherwise, false.

IsParallel(GeoLine2, GeoVector2)

Checks whether a line segment is parallel to a vector using default tolerance.

public static bool IsParallel(GeoLine2 line, GeoVector2 vector)

Parameters

line GeoLine2

The line segment.

vector GeoVector2

The vector.

Returns

bool

true if parallel; otherwise, false.

IsParallel(GeoLine2, GeoVector2, Tolerance)

Checks whether a line segment is parallel to a vector within angular tolerance.

public static bool IsParallel(GeoLine2 line, GeoVector2 vector, Tolerance tolerance)

Parameters

line GeoLine2

The line segment.

vector GeoVector2

The vector.

tolerance Tolerance

The tolerance.

Returns

bool

true if parallel; otherwise, false.

IsParallel(GeoRectangle2, GeoLine2)

Checks whether a line segment is parallel to any edge of a rotated rectangle using default tolerance.

public static bool IsParallel(GeoRectangle2 rect, GeoLine2 line)

Parameters

rect GeoRectangle2

The rectangle.

line GeoLine2

The line segment.

Returns

bool

true if parallel to the rectangle width or height axes; otherwise, false.

IsParallel(GeoRectangle2, GeoLine2, Tolerance)

Checks whether a line segment is parallel to any edge of a rotated rectangle within angular tolerance.

public static bool IsParallel(GeoRectangle2 rect, GeoLine2 line, Tolerance tolerance)

Parameters

rect GeoRectangle2

The rectangle.

line GeoLine2

The line segment.

tolerance Tolerance

The tolerance.

Returns

bool

true if parallel to the rectangle width or height axes; otherwise, false.

IsParallel(GeoRectangle2, GeoRectangle2)

Checks whether two rotated rectangles have parallel orientation (parallel axes) using default tolerance.

public static bool IsParallel(GeoRectangle2 rect1, GeoRectangle2 rect2)

Parameters

rect1 GeoRectangle2

The first rectangle.

rect2 GeoRectangle2

The second rectangle.

Returns

bool

true if their axes are parallel; otherwise, false.

IsParallel(GeoRectangle2, GeoRectangle2, Tolerance)

Checks whether two rotated rectangles have parallel orientation within angular tolerance.

public static bool IsParallel(GeoRectangle2 rect1, GeoRectangle2 rect2, Tolerance tolerance)

Parameters

rect1 GeoRectangle2

The first rectangle.

rect2 GeoRectangle2

The second rectangle.

tolerance Tolerance

The tolerance.

Returns

bool

true if their axes are parallel within tolerance; otherwise, false.