Add function to assert project time settings are ordered
This commit is contained in:
@@ -754,6 +754,12 @@ function readPositiveNumberDraft(source: string, label: string): number {
|
||||
return value;
|
||||
}
|
||||
|
||||
function assertProjectTimeSettingsAreOrdered(time: ProjectTimeSettings) {
|
||||
if (time.sunriseTimeOfDayHours >= time.sunsetTimeOfDayHours) {
|
||||
throw new Error("Project sunrise must be earlier than project sunset.");
|
||||
}
|
||||
}
|
||||
|
||||
function areVec2Equal(left: Vec2, right: Vec2): boolean {
|
||||
return left.x === right.x && left.y === right.y;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user