메서드
인스턴스 메서드
import 'dart:math';
class Point {
double x = 0;
double y = 0;
Point(this.x, this.y);
double distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return sqrt(dx * dx + dy * dy);
}
}연산자
Getter와 Setter
추상 메서드
Last updated