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).
|
||||
*
|
||||
* @return Total length of the path (in meters).
|
||||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public float getLength() {
|
||||
// TODO:
|
||||
return 0;
|
||||
float tailleChemin = 0.0f;
|
||||
for (Arc arc : this.arcs){
|
||||
tailleChemin += arc.getLength();
|
||||
}
|
||||
return tailleChemin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue