refactore(path): rename variables
這個提交存在於:
父節點
bf7f8e231d
當前提交
7deca4330c
共有 1 個檔案被更改,包括 6 行新增 和 6 行删除
|
|
@ -211,11 +211,11 @@ public class Path {
|
||||||
* @return Total length of the path (in meters).
|
* @return Total length of the path (in meters).
|
||||||
*/
|
*/
|
||||||
public float getLength() {
|
public float getLength() {
|
||||||
float retour = 0 ;
|
float somme = 0 ;
|
||||||
for (Arc arc : arcs) {
|
for (Arc arc : arcs) {
|
||||||
retour += arc.getLength();
|
somme += arc.getLength();
|
||||||
}
|
}
|
||||||
return retour;
|
return somme;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -227,11 +227,11 @@ public class Path {
|
||||||
* kilometers-per-hour).
|
* kilometers-per-hour).
|
||||||
*/
|
*/
|
||||||
public double getTravelTime(double speed) {
|
public double getTravelTime(double speed) {
|
||||||
double retour = 0 ;
|
double somme = 0 ;
|
||||||
for (Arc arc : arcs) {
|
for (Arc arc : arcs) {
|
||||||
retour += arc.getTravelTime(speed);
|
somme += arc.getTravelTime(speed);
|
||||||
}
|
}
|
||||||
return retour;
|
return somme;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
載入中…
新增問題並參考