2012-08-27 14:11:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2012-09-14 14:19:30 +00:00
|
|
|
#if !defined CUBIC_UTILITIES_H
|
|
|
|
#define CUBIC_UTILITIES_H
|
|
|
|
|
2012-07-02 20:27:02 +00:00
|
|
|
#include "DataTypes.h"
|
|
|
|
|
2012-01-25 18:57:23 +00:00
|
|
|
double cube_root(double x);
|
2012-02-03 22:07:47 +00:00
|
|
|
void coefficients(const double* cubic, double& A, double& B, double& C, double& D);
|
2012-01-25 18:57:23 +00:00
|
|
|
int cubicRoots(double A, double B, double C, double D, double t[3]);
|
2012-07-02 20:27:02 +00:00
|
|
|
double derivativeAtT(const double* cubic, double t);
|
|
|
|
// competing version that should produce same results
|
|
|
|
double derivativeAtT_2(const double* cubic, double t);
|
|
|
|
void dxdy_at_t(const Cubic& , double t, double& x, double& y);
|
|
|
|
bool rotate(const Cubic& cubic, int zero, int index, Cubic& rotPath);
|
|
|
|
double secondDerivativeAtT(const double* cubic, double t);
|
|
|
|
void xy_at_t(const Cubic& , double t, double& x, double& y);
|
2012-09-14 14:19:30 +00:00
|
|
|
|
|
|
|
#endif
|