diff --git a/packages/geometry/lib/src/geometry.dart b/packages/geometry/lib/src/geometry.dart index bbddac9b..1b54a4c8 100644 --- a/packages/geometry/lib/src/geometry.dart +++ b/packages/geometry/lib/src/geometry.dart @@ -37,8 +37,6 @@ List calculateArc({ /// /// An ellipse can be achieved by specifying a [center], a [bigRadius] and a /// [smallRadius]. -/// In addition, a semi-ellipse can be achieved by specifying its [angle] and an -/// [offsetAngle] (both in radians). /// /// The higher the [precision], the more [Vector2]s will be calculated; /// achieving a more rounded ellipse. diff --git a/packages/geometry/test/src/geometry_test.dart b/packages/geometry/test/src/geometry_test.dart index 6f583e73..9db1a833 100644 --- a/packages/geometry/test/src/geometry_test.dart +++ b/packages/geometry/test/src/geometry_test.dart @@ -52,6 +52,25 @@ void main() { ); expect(points.length, 50); }); + + test('fails if radius not in range', () { + expect( + () => calculateEllipse( + center: Vector2.zero(), + bigRadius: 100, + smallRadius: 150, + ), + throwsA(isA()), + ); + expect( + () => calculateEllipse( + center: Vector2.zero(), + bigRadius: 100, + smallRadius: 0, + ), + throwsA(isA()), + ); + }); }); group('calculateBezierCurve', () {