length method
Implementation
num length() {
final head = this.head();
final tail = this.tail();
if (tail != null) {
return tail.point.distanceTo(head.point);
}
return -1;
}
num length() {
final head = this.head();
final tail = this.tail();
if (tail != null) {
return tail.point.distanceTo(head.point);
}
return -1;
}