Implemented getLength
This commit is contained in:
parent
3bba019763
commit
b070983a49
2 changed files with 6 additions and 4 deletions
|
@ -210,11 +210,13 @@ public class Path {
|
||||||
*
|
*
|
||||||
* @return Total length of the path (in meters).
|
* @return Total length of the path (in meters).
|
||||||
*
|
*
|
||||||
* @deprecated Need to be implemented.
|
|
||||||
*/
|
*/
|
||||||
public float getLength() {
|
public float getLength() {
|
||||||
// TODO:
|
float length = 0;
|
||||||
return 0;
|
for (Arc a : this.arcs) {
|
||||||
|
length += a.getLength();
|
||||||
|
}
|
||||||
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
BIN
uml.dia
BIN
uml.dia
Binary file not shown.
Loading…
Reference in a new issue