Closed jamierpond closed 1 year ago
I know it seems annoying but I deliberately didn't want to be able to construct a TimePosition from a double.
The whole point is that a TimePosition isn't in "seconds" so constructing one from a double is ambiguous. Is the double minutes, hours, frames etc. That's the whole point of the explicit fromSeconds
function.
If you're using compile-time constants, you can use the chrono literals to construct them e.g. 1s, 2ms
etc.
And can't you construct a BarsAndBeats using aggregate initialisation like this:
BarsAndBeats ({ numBars })
?
Hmmm... that's fair. I thought this was probably the case.
BarsAndBeats
needed a more explicit constructor since now it's ambiguous whether it's constructing that or a TimeRange.
Basically allows constructions of TimeRanges with branced loops, and implicit casting of doubles to TimePositions.