Skip to content

Commit

Permalink
deprecate notices, only really needed because of bounds and tilecoord…
Browse files Browse the repository at this point in the history
…inates
  • Loading branch information
mootw committed Dec 3, 2024
1 parent c918f08 commit bd99ca1
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions lib/src/misc/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,22 @@ import 'dart:ui';

/// Extension methods for the math.[Point] class
extension PointExtension<T extends num> on Point<T> {
/// Create new [Point] whose [x] and [y] values are divided by the respective
/// values in [point].
Point<double> unscaleBy(Point<num> point) {
return Point<double>(x / point.x, y / point.y);
}

/// Create a new [Point] where the [x] and [y] values are divided by [factor].
@Deprecated('Replace with Offset')
Point<double> operator /(num factor) {
return Point<double>(x / factor, y / factor);
}

/// Create a new [Point] where the [x] and [y] values are rounded to the
/// nearest integer.
Point<int> round() {
return Point<int>(x.round(), y.round());
}

/// Create a new [Point] where the [x] and [y] values are rounded up to the
/// nearest integer.
@Deprecated('Replace with Offset')
Point<int> ceil() {
return Point<int>(x.ceil(), y.ceil());
}

/// Create a new [Point] where the [x] and [y] values are rounded down to the
/// nearest integer.
@Deprecated('Replace with Offset')
Point<int> floor() {
return Point<int>(x.floor(), y.floor());
}
Expand Down

0 comments on commit bd99ca1

Please sign in to comment.