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
v1GeoVector2The first vector.
v2GeoVector2The 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
v1GeoVector2The first vector.
v2GeoVector2The second vector.
toleranceToleranceThe 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
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
line1GeoLine2The first line segment.
line2GeoLine2The second line segment.
toleranceToleranceThe 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
lineGeoLine2The line segment.
vectorGeoVector2The 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
lineGeoLine2The line segment.
vectorGeoVector2The vector.
toleranceToleranceThe 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
rectGeoRectangle2The rectangle.
lineGeoLine2The 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
rectGeoRectangle2The rectangle.
lineGeoLine2The line segment.
toleranceToleranceThe 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
rect1GeoRectangle2The first rectangle.
rect2GeoRectangle2The 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
rect1GeoRectangle2The first rectangle.
rect2GeoRectangle2The second rectangle.
toleranceToleranceThe tolerance.
Returns
- bool
true if their axes are parallel within tolerance; otherwise, false.