|
|
|
@ -33,6 +33,27 @@ void main() {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
group('calculateEllipse', () {
|
|
|
|
|
test('returns by default 100 points as indicated by precision', () {
|
|
|
|
|
final points = calculateEllipse(
|
|
|
|
|
center: Vector2.zero(),
|
|
|
|
|
bigRadius: 100,
|
|
|
|
|
smallRadius: 50,
|
|
|
|
|
);
|
|
|
|
|
expect(points.length, 100);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('returns as many points as indicated by precision', () {
|
|
|
|
|
final points = calculateEllipse(
|
|
|
|
|
center: Vector2.zero(),
|
|
|
|
|
bigRadius: 100,
|
|
|
|
|
smallRadius: 50,
|
|
|
|
|
precision: 50,
|
|
|
|
|
);
|
|
|
|
|
expect(points.length, 50);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
group('calculateBezierCurve', () {
|
|
|
|
|
test('fails if step not in range', () {
|
|
|
|
|
expect(
|
|
|
|
|