Fixed two crashes when working with parametric curves, Issue 590
This commit is contained in:
@@ -72,8 +72,10 @@ DiagonalCurve::DiagonalCurve (const std::vector<double>& p, int poly_pn) {
|
|||||||
identity = false;
|
identity = false;
|
||||||
|
|
||||||
x = new double[9];
|
x = new double[9];
|
||||||
for (int i=0; i<4; i++)
|
x[0] = p[0];
|
||||||
x[i] = p[i];
|
for (int i=1; i<4; i++) {
|
||||||
|
x[i] = min(max(p[i],0.001),0.99);
|
||||||
|
}
|
||||||
for (int i=4; i<8; i++)
|
for (int i=4; i<8; i++)
|
||||||
x[i] = (p[i]+100.0)/200.0;
|
x[i] = (p[i]+100.0)/200.0;
|
||||||
if (p.size()<9)
|
if (p.size()<9)
|
||||||
|
Reference in New Issue
Block a user