getSpacedPoints method
divisions -- number of pieces to divide the curve into. Default is 5
.
Returns a set of divisions + 1 equi-spaced points using getPointAt( u ).
Implementation
@override
List<Vector?> getSpacedPoints([num divisions = 40, num offset = 0.0]) {
final List<Vector?> points = [];
for (int i = 0; i <= divisions; i++) {
double offst = offset + i / divisions;
if (offst > 1.0) {
offst = offst - 1.0;
}
points.add(getPoint(offst));
}
if (autoClose) {
points.add(points[0]);
}
return points;
}