ajout: Implémentation de Path#getLength
This commit is contained in:
parent
67cd79287d
commit
e9bed01d8c
1 changed files with 5 additions and 3 deletions
|
|
@ -213,11 +213,13 @@ public class Path {
|
||||||
* Compute the length of this path (in meters).
|
* Compute the length of this path (in meters).
|
||||||
*
|
*
|
||||||
* @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 tailleChemin = 0.0f;
|
||||||
return 0;
|
for (Arc arc : this.arcs){
|
||||||
|
tailleChemin += arc.getLength();
|
||||||
|
}
|
||||||
|
return tailleChemin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue