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

Function orient2dexact

tools/Predicates/predicates.c:1447–1490  ·  view source on GitHub ↗
(pa, pb, pc)

Source from the content-addressed store, hash-verified

1445}
1446
1447REAL orient2dexact(pa, pb, pc)
1448REAL *pa;
1449REAL *pb;
1450REAL *pc;
1451{
1452 INEXACT REAL axby1, axcy1, bxcy1, bxay1, cxay1, cxby1;
1453 REAL axby0, axcy0, bxcy0, bxay0, cxay0, cxby0;
1454 REAL aterms[4], bterms[4], cterms[4];
1455 INEXACT REAL aterms3, bterms3, cterms3;
1456 REAL v[8], w[12];
1457 int vlength, wlength;
1458
1459 INEXACT REAL bvirt;
1460 REAL avirt, bround, around;
1461 INEXACT REAL c;
1462 INEXACT REAL abig;
1463 REAL ahi, alo, bhi, blo;
1464 REAL err1, err2, err3;
1465 INEXACT REAL _i, _j;
1466 REAL _0;
1467
1468 Two_Product(pa[0], pb[1], axby1, axby0);
1469 Two_Product(pa[0], pc[1], axcy1, axcy0);
1470 Two_Two_Diff(axby1, axby0, axcy1, axcy0,
1471 aterms3, aterms[2], aterms[1], aterms[0]);
1472 aterms[3] = aterms3;
1473
1474 Two_Product(pb[0], pc[1], bxcy1, bxcy0);
1475 Two_Product(pb[0], pa[1], bxay1, bxay0);
1476 Two_Two_Diff(bxcy1, bxcy0, bxay1, bxay0,
1477 bterms3, bterms[2], bterms[1], bterms[0]);
1478 bterms[3] = bterms3;
1479
1480 Two_Product(pc[0], pa[1], cxay1, cxay0);
1481 Two_Product(pc[0], pb[1], cxby1, cxby0);
1482 Two_Two_Diff(cxay1, cxay0, cxby1, cxby0,
1483 cterms3, cterms[2], cterms[1], cterms[0]);
1484 cterms[3] = cterms3;
1485
1486 vlength = fast_expansion_sum_zeroelim(4, aterms, 4, bterms, v);
1487 wlength = fast_expansion_sum_zeroelim(vlength, v, 4, cterms, w);
1488
1489 return w[wlength - 1];
1490}
1491
1492REAL orient2dslow(pa, pb, pc)
1493REAL *pa;

Callers 1

init_predicatesFunction · 0.85

Calls 1

Tested by

no test coverage detected