Show the calculated speed of the route on the map
This commit is contained in:
@@ -279,7 +279,7 @@ float calculate_speed(float starting_speed, float horizontal_distance, float hei
|
||||
if (final_speed < minimum_speed) {
|
||||
return -1;
|
||||
} else {
|
||||
return std::min(final_speed, maximum_speed);
|
||||
return std::fmin(final_speed, maximum_speed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,6 +759,8 @@ EMSCRIPTEN_BINDINGS(my_module) {
|
||||
.property("nodeId", &JSNodeInfo::nodeId)
|
||||
.property("positionX", &JSNodeInfo::positionX)
|
||||
.property("positionY", &JSNodeInfo::positionY)
|
||||
.property("positionZ", &JSNodeInfo::positionZ)
|
||||
.property("currentSpeed", &JSNodeInfo::currentSpeed)
|
||||
.property("distanceFromStart", &JSNodeInfo::distanceFromStart);
|
||||
|
||||
emscripten::class_<JSSearchResult>("SearchResult")
|
||||
|
||||
Reference in New Issue
Block a user