canvas with panning
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import 'dart:ui' show Offset;
|
||||
|
||||
extension OffsetCartesionOps on Offset {
|
||||
double distanceSquared(Offset other) {
|
||||
final dx = this.dx - other.dx;
|
||||
final dy = this.dy - other.dy;
|
||||
return dx * dx + dy * dy;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user