Re: [geometry] Review request

Hi Kari,

> On May 30, 2014, at 12:03 PM, "Kari Pihkala" <> wrote:
> I think there are few exception cases missing in the DOMMatrix:
> - SVGMatrix.rotateFromVector() can raise an exception, should
> DOMMatrix.rotateFromVector() and rotateFromVectorBy() also raise
> exceptions if values are invalid?

You are right that SVGMatrix throw an exception. For SVG2 we already decided to change the behavior. DOMMatrix says: "If x and y should both be zero, the angle is specified as zero.". [1]

> - DOMMatrix.inverse() raises an exception if the matrix is
> non-invertible, should DOMMatrix.invert() also do it?

Yes, that was an oversight. Thanks.

> - can DOMMatrix.rotateAxisAngle() and rotateAxisAngleBy() fail? What
> if x, y, and z are zero?

The behavior is defined by the matrix in [2]. No exception necessary.

Thanks a lot for the review!


> BR,
> Kari


Received on Monday, 2 June 2014 15:15:15 UTC