Length
这个提交包含在:
当前提交
ce66d2162b
共有 2 个文件被更改,包括 6 次插入 和 2 次删除
|
|
@ -210,7 +210,7 @@ public class Path {
|
|||
*
|
||||
* @return Total length of the path (in meters).
|
||||
*
|
||||
* @deprecated Need to be implemented.
|
||||
*
|
||||
*/
|
||||
public float getLength() {
|
||||
// TODO:
|
||||
|
|
@ -232,7 +232,11 @@ public class Path {
|
|||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public double getTravelTime(double speed) {
|
||||
return speed/(getLength()*3.6);
|
||||
double TotalTime = 0;
|
||||
for (Arc a : arcs){
|
||||
TotalTime += a.getTravelTime(speed);
|
||||
}
|
||||
return TotalTime;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
正在加载…
在新工单中引用