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

Function TEST

tests/tools/Predicates/predicates_test.h:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9TEST(Orientat3D, Simple) {
10 double a[3]{0.0, 0.0, 0.0};
11 double b[3]{0.0, 0.0, 0.0};
12 double c[3]{0.0, 0.0, 0.0};
13 double d[3]{0.0, 0.0, 0.0};
14 double r1 = orient3d(a,b,c,d);
15 double r2 = orient3dexact(a,b,c,d);
16 using Arr3D = Eigen::Matrix<double, 3, 1>;
17 auto run = [](Arr3D& pa, Arr3D& pb, Arr3D& pc, Arr3D& pd) {
18 return orient3d(pa.data(), pb.data(), pc.data(), pd.data());
19 };
20 Arr3D pa(0,0,0);
21 double r3 = run(pa, pa, pa, pa);
22 ASSERT_EQ(r1, r2);
23 ASSERT_EQ(r1, r3);
24}

Callers

nothing calls this directly

Calls 2

orient3dFunction · 0.85
orient3dexactFunction · 0.85

Tested by

no test coverage detected