fixed transformVec, oneLineSummary#2
Conversation
|
I think the change to transformVec is wrong: transformVec: (a) ->
# transforms a 2-item array in place
@transformPair(a[0], a[1])It wouldn't change it "in place" as the function is supposed to do. Here's the original: transformVec: (a) ->
# transforms a 2-item array in place
t0 = @m00 * a[0] + @m01 * a[1] + @v0
t1 = @m10 * a[0] + @m11 * a[1] + @v1
a[0] = t0
a[1] = t1If you want it to return the modified array, you could add one more line to the bottom setting the return value to the input. |
|
yes i know. I tried it again and now it works, don't know what I missed first. |
|
now its again in place and the summery is fixed. |
There was a problem hiding this comment.
I'm a little confused about this change. The printout says "scale = " and then it was previously printing getXScale() and getYScale(), but after your change it says "scale =" and then prints the center. Can you explain?
|
There is no function getXScale(), so I thought it was a typo. But now I think its unnecessary or rather not possible to print the scale from the matrix. Wouldn't it be better to leave the printing of the scale? |
No description provided.