Hi there, I’ve got a question regarding the CCAffineTransformTranslate
function:
CCAffineTransform CCAffineTransformTranslate(const CCAffineTransform& t, float tx, float ty) { return __CCAffineTransformMake(t.a, t.b, t.c, t.d, t.tx + t.a * tx + t.c * ty, t.ty + t.b * tx + t.d * ty); }
IMO it should be
@
(x+tx, y+ty)CTM
=(x,y)CTMCTM
=CTM(t.tx + t.a * tx + t.c * ty, t.ty + t.b * tx + t.d * ty, 1)
=(x,y)CCAffineTransformMake;@
That is, a coefficient 2 is needed there.
Correct me if there’s any mistake, thank you guys!
UPDATE
ah I found where I’m wrong, it should be:
@
CTM
=CTMCTM
=CTM*
=CTM**CCAffineTransformMake(t.a, t.b, t.c, t.d, t.tx + t.a * tx + t.c * ty, t.ty + t.b * tx + t.d * ty);@
Problem cleared, but I won’t delete it in case someone has got the same doubt …