is_collinear#
- static GeometryOperators.is_collinear(a: list, b: list, tol: float = 1e-06) bool#
Check if two vectors are collinear (parallel or anti-parallel).
- Parameters:
- a
List List of
[x, y, z]coordinates for the first vector.- b
List List of
[x, y, z]coordinates for the second vector.- tol
float Linear tolerance. The default value is
1e-6.
- a
- Returns:
- bool
Trueif vectors are collinear,Falseotherwise.
Examples
>>> from ansys.aedt.core.modeler.geometry_operators import GeometryOperators >>> obj = GeometryOperators() >>> obj.is_collinear(a=[1, 0, 0], b=[0, 1, 0])