   A little question about rotations... RESOLVED
  <RESOLVED>I'm working on an engine in C++ that uses DirectX, but I have a slight problem:  I've been working on the sprite functions, and I can't use D3DX transformations, since my "sprite" is actually a textured quad using the D3DFVF_XYZRHW flag.  So, I've been working on manually rotating and translating it.  I can translate it just fine, but I can't get the rotation correct.  The vertices stretch and deform as they move along, creating something that looks more like a thin and long rhombus than a square.Here are the calculations I've been using:vertices.x=((vertices.x*cos(spr.angle))+(vertices.y*sin(spr.angle)));vertices.y=((-vertices.x*sin(spr.angle))+(vertices.y*cos(spr.angle)));Do you have any idea what might be causing the stretch?I realize that I'm doing DirectX programming, but seeing as this is a general math issue that could apply to many different areas, I thought it would fit best here.  Sorry if it isn't...   
  You are calculating the new X component first and then transform the Y component using the already transformed X component.What you want to do is first save the old position in a temporary variable and use that to calculate the transformed position.cheers,mad   ;  Thanks.  It works perfectly now.  I figured it was something stupid.  I was having problems earlier (using slightly modified copies of the coordinates to adjust so the origin was in the center), so I didn't think about it.  Once again, thanks.   ;  you're welcome ;)   