Getlength

This commit is contained in:
Favary Pierre 2021-03-24 17:19:58 +01:00
parent bbf82ecfac
commit 8ab68ac6e7
2 changed files with 6 additions and 4 deletions

View file

@ -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 longeur=0;
return 0; for (int i=0;i<this.arcs.size();i++) {
longeur+=this.arcs.get(i).getLength();
}
return longeur;
} }
/** /**

View file

@ -12,7 +12,7 @@
<name>be-graphes-all</name> <name>be-graphes-all</name>
<properties> <properties>
<jdk.version>1.8</jdk.version> <jdk.version>1.11</jdk.version>
<maven.compiler.source>${jdk.version}</maven.compiler.source> <maven.compiler.source>${jdk.version}</maven.compiler.source>
<maven.compiler.target>${jdk.version}</maven.compiler.target> <maven.compiler.target>${jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>