blob: ffaeeb287920a22f262ab18a70b97b3d5f29ca5c [file] [log] [blame]
caryclark@google.com9e49fb62012-08-27 14:11:33 +00001/*
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 */
caryclark@google.com235f56a2012-09-14 14:19:30 +00007#if !defined CUBIC_UTILITIES_H
8#define CUBIC_UTILITIES_H
9
caryclark@google.com8dcf1142012-07-02 20:27:02 +000010#include "DataTypes.h"
11
caryclark@google.com27accef2012-01-25 18:57:23 +000012double cube_root(double x);
caryclark@google.comc6825902012-02-03 22:07:47 +000013void coefficients(const double* cubic, double& A, double& B, double& C, double& D);
caryclark@google.com27accef2012-01-25 18:57:23 +000014int cubicRoots(double A, double B, double C, double D, double t[3]);
caryclark@google.com8dcf1142012-07-02 20:27:02 +000015double 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);
caryclark@google.com235f56a2012-09-14 14:19:30 +000022
23#endif