1
0
Ответвление 0

Сравнить коммиты

...

2 коммитов

Автор SHA1 Сообщение Дата
bf7f8e231d chore(path): remove getLength deprecation flag 2024-03-25 09:04:35 +01:00
b8aeab9180 feat(path): implement getTravelTime 2024-03-25 09:04:00 +01:00

Просмотреть файл

@ -209,8 +209,6 @@ public class Path {
* Compute the length of this path (in meters). * Compute the length of this path (in meters).
* *
* @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() {
float retour = 0 ; float retour = 0 ;
@ -227,12 +225,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;
} }
/** /**