With known coordinates of my Target and Shooter I need to fire a Bullet from the Shooter at the Target. I'm doing this in 2d to simplify things, I believe my math is a little wrong though.

I create a sprite at my Shooter, have it rotate to face the target, then move towards it. The bullet gets about half way then starts to spazz out.

void Projectile::SeekTarget(void)
{
int x2 = dbSpriteX(targetNum);
int y2 = dbSpriteY(targetNum);
int x1 = dbSpriteX(sNum);
int y1 = dbSpriteY(sNum);
float x = x2-x1;
float y = y2-y1;
float rad = dbATANFULL(y, x);
float angle = rad * 180 / PI;
dbRotateSprite(sNum,angle-90);
dbMoveSprite(sNum,1);
}