rescaleToFit method
void
rescaleToFit(})
Implementation
void rescaleToFit(double length, int dim,
{bool stretch = false, Vector3 aboutEdge = ORIGIN, Vector3? aboutPoint}) {
var oldLength = lengthOverDim(dim);
if (oldLength == 0) {
return;
}
if (stretch) {
this.stretch(length / oldLength, dim,
aboutEdge: aboutEdge, aboutPoint: aboutPoint);
} else {
scaleUniformly(length / oldLength,
aboutEdge: aboutEdge, aboutPoint: aboutPoint);
}
}