Allow zero duration when flying to globe position

Consistent with other fly to functions
This commit is contained in:
Emma Broman
2023-11-21 13:59:05 +01:00
parent 320f349ad1
commit 722c58f50a

View File

@@ -391,9 +391,8 @@ namespace {
instruction.setValue("PathType", std::string("ZoomOutOverview"));
if (duration.has_value()) {
constexpr double Epsilon = 1e-5;
if (*duration <= Epsilon) {
throw ghoul::lua::LuaError("Duration must be larger than zero");
if (*duration < 0) {
throw ghoul::lua::LuaError("Duration must be a positive value");
}
instruction.setValue("Duration", *duration);
}