Implemented getLength

This commit is contained in:
Arnaud Vergnet 2020-03-20 14:44:43 +01:00
parent 3bba019763
commit b070983a49
2 changed files with 6 additions and 4 deletions

View file

@ -209,12 +209,14 @@ public class Path {
* Compute the length of this path (in meters).
*
* @return Total length of the path (in meters).
*
* @deprecated Need to be implemented.
*
*/
public float getLength() {
// TODO:
return 0;
float length = 0;
for (Arc a : this.arcs) {
length += a.getLength();
}
return length;
}
/**

BIN
uml.dia

Binary file not shown.