feat(path): implement getTravelTime
This commit is contained in:
parent
853edfb344
commit
b8aeab9180
1 changed files with 5 additions and 4 deletions
|
@ -227,12 +227,13 @@ public class Path {
|
||||||
*
|
*
|
||||||
* @return Time (in seconds) required to travel this path at the given speed (in
|
* @return Time (in seconds) required to travel this path at the given speed (in
|
||||||
* kilometers-per-hour).
|
* kilometers-per-hour).
|
||||||
*
|
|
||||||
* @deprecated Need to be implemented.
|
|
||||||
*/
|
*/
|
||||||
public double getTravelTime(double speed) {
|
public double getTravelTime(double speed) {
|
||||||
// TODO:
|
double retour = 0 ;
|
||||||
return 0;
|
for (Arc arc : arcs) {
|
||||||
|
retour += arc.getTravelTime(speed);
|
||||||
|
}
|
||||||
|
return retour;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue