ajout: Implémentation de Path#getTravelTime(double speed)
This commit is contained in:
parent
e9bed01d8c
commit
4f95b5539b
1 changed files with 2 additions and 3 deletions
|
|
@ -228,11 +228,10 @@ public class Path {
|
||||||
* @param speed Speed to compute the travel time.
|
* @param speed Speed to compute the travel time.
|
||||||
* @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:
|
// v=d/t <=> t=d/v
|
||||||
return 0;
|
return (this.getLength()/speed)*3.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue