MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / is_colinear_2D

Method is_colinear_2D

tools/MeshUtils/FaceUtils.cpp:9–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace PyMesh;
8
9bool FaceUtils::is_colinear_2D(
10 const Vector2F& v0,
11 const Vector2F& v1,
12 const Vector2F& v2) {
13 exactinit();
14 double v0_xy[2] = {v0[0], v0[1]};
15 double v1_xy[2] = {v1[0], v1[1]};
16 double v2_xy[2] = {v2[0], v2[1]};
17 return orient2d(v0_xy, v1_xy, v2_xy) == 0;
18}
19
20bool FaceUtils::is_colinear_3D(
21 const Vector3F& v0,

Callers 1

is_colinearFunction · 0.80

Calls 2

exactinitFunction · 0.85
orient2dFunction · 0.85

Tested by

no test coverage detected