Skip to content

[css-geometry] Transforming a point with a matrix has things backwards somewhere #359

Open
@bzbarsky

Description

@bzbarsky

https://drafts.fxtf.org/geometry/#transform-a-point-with-a-matrix says:

  1. Let pointVector be a new column vector with the elements being x, y, z, and w, respectively.
  2. Set pointVector to pointVector post-multiplied by matrix.

Where "post-multiplied" links to https://drafts.fxtf.org/geometry/#post-multiply which says:

Term A post-multiplied by term B is equal to A · B.

So this is doing v * M where v is a length-4 column vector and M is a 4x4 matrix. That's not a legal multiplication: the sizes don't match, right?

Does this algorithm mean to do M * v (so s/post-multiplied/pre-multiplied/ or switching the order of args to "post-multiplied" around) or does this algorithm mean to have v be a row vector?

Looking at what implementations do here, it looks to me like Blink does M * v. So does Gecko, as far as I can tell.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions