Skip to content

Commit

Permalink
add CustomPoint.toOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
tlserver committed Jul 17, 2023
1 parent 3f18982 commit a2acb60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/misc/point.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class CustomPoint<T extends num> extends math.Point<T> {
CustomPoint<double> toDoublePoint() =>
CustomPoint<double>(x.toDouble(), y.toDouble());

Offset toOffset() => Offset(x.toDouble(), y.toDouble());

@override
String toString() => 'CustomPoint ($x, $y)';
}
Expand Down

0 comments on commit a2acb60

Please sign in to comment.