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