[core] GCC 4.9 does not allow using another member in a constexpr ctor

This commit is contained in:
Bruno de Oliveira Abinader
2017-07-07 17:08:42 +03:00
parent 8af593f89c
commit 1aacc88f35

View File

@@ -34,11 +34,11 @@ struct UnitBezier {
// Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).
constexpr UnitBezier(double p1x, double p1y, double p2x, double p2y)
: cx(3.0 * p1x)
, bx(3.0 * (p2x - p1x) - cx)
, ax(1.0 - cx - bx)
, bx(3.0 * (p2x - p1x) - (3.0 * p1x))
, ax(1.0 - (3.0 * p1x) - (3.0 * (p2x - p1x) - (3.0 * p1x)))
, cy(3.0 * p1y)
, by(3.0 * (p2y - p1y) - cy)
, ay(1.0 - cy - by) {
, by(3.0 * (p2y - p1y) - (3.0 * p1y))
, ay(1.0 - (3.0 * p1y) - (3.0 * (p2y - p1y) - (3.0 * p1y))) {
}
double sampleCurveX(double t) const {