You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see why multiplySelf should accept a DOMMatrix-like object, rather than an actual DOMMatrix object.
If multiplySelf accepted DOMMatrix instances only (like an API of this sort would typically do, where "other" in a multiply(other) type of method is typically the same type of object as the object on which the method is called), then there would be no need to do runtime type checking of plain JS objects, which would improve performance.
By making it accept DOMMatrix instances, it would be possible to avoid the fixup steps, because the operations on DOMMatrix always produce valid properties (f.e. a is always the same value as m11).
Is there a specific reason why we want to pass in non-DOMMatrix objects?
The text was updated successfully, but these errors were encountered:
trusktr
changed the title
[geometry-1] Why does multiplySelf just accept another DOMMatrix?
[geometry-1] Why does multiplySelf (etc) accept DOMMatrixInit instead of DOMMatrix?
Dec 30, 2024
I don't see why
multiplySelf
should accept a DOMMatrix-like object, rather than an actual DOMMatrix object.If
multiplySelf
acceptedDOMMatrix
instances only (like an API of this sort would typically do, where "other" in a multiply(other) type of method is typically the same type of object as the object on which the method is called), then there would be no need to do runtime type checking of plain JS objects, which would improve performance.By making it accept
DOMMatrix
instances, it would be possible to avoid the fixup steps, because the operations on DOMMatrix always produce valid properties (f.e.a
is always the same value asm11
).instead of this:
we could have
Is there a specific reason why we want to pass in non-DOMMatrix objects?
The text was updated successfully, but these errors were encountered: