You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
335 B
Dart
10 lines
335 B
Dart
import 'package:tuple/tuple.dart';
|
|
|
|
class Point extends Tuple2 {
|
|
Point(x, y) : super(x, y);
|
|
|
|
Point operator +(Point other) => Point(item1 + other.item1, item2 + other.item2);
|
|
Point operator -(Point other) => Point(item1 - other.item1, item2 - other.item2);
|
|
Point operator *(int other) => Point(item1 * other, item2 * other);
|
|
}
|