ananthi
December 13th, 2005, 03:01 AM
hi
Help me in this....i am now trying a code in c..for rotating an image.......i m getting the output different for different angles..i.e. if the angle is 90 degree it is rotating at some other angle....i m using themathematical:
x1 = (x0-center_x) * cos(angle) + (y0-center_y) * sin(angle) + center_x
y1 = -(x0-center_x)* sin(angle) + (y0-center_y) * cos(angle) + center_y
Help me in this....i am now trying a code in c..for rotating an image.......i m getting the output different for different angles..i.e. if the angle is 90 degree it is rotating at some other angle....i m using themathematical:
x1 = (x0-center_x) * cos(angle) + (y0-center_y) * sin(angle) + center_x
y1 = -(x0-center_x)* sin(angle) + (y0-center_y) * cos(angle) + center_y