Re: [fxtf-drafts] [geometry] Why does DOMMatrixReadOnly.scale() take an origin, but rotate() does not? (#213)

I think the consistency might be nice. It would look like this (based on scale):

```js
 rotateSelf(rotX = 0, rotY?: number, rotZ?: number, originX = 0, originY = 0, originZ = 0) {
  this.translateSelf(originX, originY, originZ)

  if (rotY == null && rotZ == null) {
   rotX = 0
   rotY = 0
   rotZ = rotX
  }

  rotY ??= 0
  rotZ ??= 0

  this.rotateAxisAngleSelf(0, 0, 1, rotZ)
  this.rotateAxisAngleSelf(0, 1, 0, rotY)
  this.rotateAxisAngleSelf(1, 0, 0, rotX)

  this.translateSelf(-originX, -originY, -originZ)

  return this
 }
```

This

```js
mat.translateSelf(originX, originY, originZ)
mat.rotateSelf(rotx, roty, rotz)
mat.translateSelf(-originX, -originY, -originZ)
```

wouold become

```js
mat.rotateSelf(rotx, roty, rotz, originX, originY, originZ)
```

-- 
GitHub Notification of comment by trusktr
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/213#issuecomment-2558054435 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 21 December 2024 08:54:29 UTC