Opened 12 years ago

Closed 12 years ago

#3496 closed defect (fixed)

Typo in dojox.gfx.matrix.invert()

Reported by: Eugene Lazutkin Owned by: Eugene Lazutkin
Priority: high Milestone: 0.9beta
Component: gfx (svg+vml) Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

From e-mail:

Hello Eugene,

I am merging the matrix3d.js to dojox.gfx3d, and as the reference, I found that the dojox/gfx/matrix.js invert:

208         var M = new dojox.gfx.matrix.Matrix2D({
209             xx: m.yy/D, xy: -m.xy/D,
210             yx: -m.yx/D, yy: m.xx/D,
211             dx: (m.yx * m.dy - m.yy * m.dx) / D,
212             dy: (m.xy * m.dx - m.xx * m.dy) / D
213         });

It looks like

dx: (m.xy * m.dy -m.yy * m.dx) / D
dy: (m.yx * m.dx - m.xx * m.dy) / D

Could you take a look at it?

Best regards, Kun Xi

Change History (3)

comment:1 Changed 12 years ago by Eugene Lazutkin

Description: modified (diff)

comment:2 Changed 12 years ago by Eugene Lazutkin

Status: newassigned

Yep, it is a typo. I am fixing it in the trunk. The reason it was never noticed is that majority of people use matrices for scaling and transformation, which have xy = yx = 0.

comment:3 Changed 12 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [9257]) Corrected typo. Thx Kun Xi. Fixes #3496.

Note: See TracTickets for help on using tickets.