Changed affine transformation equation.

It's still incorrect because 'edge' points are calculated incorrectly.