ajout: Implémentation de Path#getTravelTime(double speed)

This commit is contained in:
Brendan Saint Germes 2026-04-10 14:27:11 +02:00
parent e9bed01d8c
commit 4f95b5539b

View file

@ -228,11 +228,10 @@ public class Path {
* @param speed Speed to compute the travel time.
* @return Time (in seconds) required to travel this path at the given speed (in
* kilometers-per-hour).
* @deprecated Need to be implemented.
*/
public double getTravelTime(double speed) {
// TODO:
return 0;
// v=d/t <=> t=d/v
return (this.getLength()/speed)*3.6;
}
/**