mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Added TimeRange.getMiddle()
This commit is contained in:
@@ -31,6 +31,10 @@ time_type TimeRange::getDuration() const {
|
||||
return end - start;
|
||||
}
|
||||
|
||||
time_type TimeRange::getMiddle() const {
|
||||
return (start + end) / 2;
|
||||
}
|
||||
|
||||
bool TimeRange::empty() const {
|
||||
return start == end;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
time_type getStart() const;
|
||||
time_type getEnd() const;
|
||||
time_type getDuration() const;
|
||||
time_type getMiddle() const;
|
||||
bool empty() const;
|
||||
|
||||
void setStart(time_type newStart);
|
||||
|
||||
Reference in New Issue
Block a user