Skip to content

RationalTime.__add__ always uses the higher rate #262

Open
@ssteinbach

Description

@ssteinbach

Currently when you have:

a = RationalTime(0, 12)
b = RationalTime(10, 24)
c = a + b
d = b + a

c.rate == d.rate == 24
# True

Both c and d will be at rate 24, because the __add__ method always produces a RationalTime in the higher of the two rates. This might be the correct behavior, or it could be unpredictable.

A potential alternative would use the order of the arguments to choose which rate to use in the product. I'm filing this issue to see if anyone objects to this behavior or if we should leave it the way it is.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions