CubicUtilities.h revision 235f56a92f6eb6accbb243e11b3c45e3798f38f2
1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#if !defined CUBIC_UTILITIES_H
8#define CUBIC_UTILITIES_H
9
10#include "DataTypes.h"
11
12double cube_root(double x);
13void coefficients(const double* cubic, double& A, double& B, double& C, double& D);
14int cubicRoots(double A, double B, double C, double D, double t[3]);
15double derivativeAtT(const double* cubic, double t);
16// competing version that should produce same results
17double derivativeAtT_2(const double* cubic, double t);
18void dxdy_at_t(const Cubic& , double t, double& x, double& y);
19bool rotate(const Cubic& cubic, int zero, int index, Cubic& rotPath);
20double secondDerivativeAtT(const double* cubic, double t);
21void xy_at_t(const Cubic& , double t, double& x, double& y);
22
23#endif
24