List of usage examples for java.awt.geom CubicCurve2D solveCubic
public static int solveCubic(double[] eqn, double[] res)
From source file:Cubic.java
protected int findRoots(double y, double[] roots) { double[] eqn = { p1.y - y, 3 * (p2.y - p1.y), 3 * (p1.y - 2 * p2.y + p3.y), 3 * p2.y - p1.y + p4.y - 3 * p3.y }; return CubicCurve2D.solveCubic(eqn, roots); // return solveCubic(eqn[3], eqn[2], eqn[1], eqn[0], roots); }