1f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com// included by QuadraticParameterization.cpp
2f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com// accesses internal functions to validate parameterized coefficients
3f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com
4f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com#include "Parameterization_Test.h"
5f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com
6f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.combool point_on_parameterized_curve(const Quadratic& quad, const _Point& point) {
7235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    QuadImplicitForm q(quad);
8235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    double  xx = q.x2() * point.x * point.x;
9235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    double  xy = q.xy() * point.x * point.y;
10235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    double  yy = q.y2() * point.y * point.y;
11235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    double   x = q.x() * point.x;
12235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    double   y = q.y() * point.y;
13235f56a92f6eb6accbb243e11b3c45e3798f38f2caryclark@google.com    double   c = q.c();
14f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com    double sum = xx + xy + yy + x + y + c;
15f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com    return approximately_zero(sum);
16f47c217cc8de3be1f960156bfb76899a8e4bcccfcaryclark@google.com}
17