   trouble building polygons in 2D
  Ok, so I've recently started developing for the Nintendo DS using PAlib. The big problem is of course that the DS lacks a proper method fro dealing with floating point-math. So everything has to be converted to Fixed point. This makes angular calculations tough for me to understand, since I'm not really a mathematician, although I have the basic skills for trig calculations. I'm trying to create "asteroids" that are supposed to be just polygons. I've looked some at a piece of code that does just that, except they use radians and floating point math, whilst I am stuck with PAlibs fixed point angle-system (which ranges from 0 to 511) and fixed point math. This is my code so far: Vector _pos(_x,_y);u16 _numPts = 5/*PA_RandMinMax( 4, 8 )*/;std::vector<Vector*> _Poly(_numPts);u16 fixedPI= (u16)(3.1415 * (1 << 8 ));u16 a= fixedPI / _numPts >> 8;u16 da= 2 * fixedPI / _numPts; for( u16 i = 0; i < _numPts; i++ ){a += (da >> 8 );u32 _tmpX  = (PA_Cos( a ) << 4;   u32 _tmpY= (PA_Sin( a ) << 4;Vector* tmpV= new Vector( _x + _tmpX, _y + _tmpY );_Poly.at( i ) = tmpV;PA_OutputText( 1, 1, i + 1, "Poly %d x = %d , y = %d", i, _tmpX, _tmpY);}This code gives my the following output:Poly 0 x = 4096 y = 48Poly 1 x = 4096 y = 96Poly 2 x = 4096 y = 144Poly 3 x = 4096 y = 208Poly 4 x = 4096 y = 256As you can see, the x-values are all messed up. Maybe the y-values to, but that is hard to see without some visual feedback. PA_Cos( ) and PA_Sin( ) each takes an integer, and returns a value between -256 and 256 since this is fixed point math. Can anyone see what I am doing wrong, and maybe explain it to me?Thanks   