Added new function applyToPoint to apply the current matrix to a point (x, y, 1)t