sampleCubic function
List<DiagramPoint>
sampleCubic(
- DiagramPoint start,
- DiagramPoint firstControl,
- DiagramPoint secondControl,
- DiagramPoint end, {
- required int steps,
steps + 1 uniformly parameterized points, including both ends.
Implementation
List<DiagramPoint> sampleCubic(
DiagramPoint start,
DiagramPoint firstControl,
DiagramPoint secondControl,
DiagramPoint end, {
required int steps,
}) => [
for (var step = 0; step <= steps; step += 1)
cubicAt(start, firstControl, secondControl, end, step / steps),
];