radial_shot/main.c
/**
 * Assumes the base of the image is at its mid-left point. This isn't a problem
 * if you're drawing your images with the appropriated Draw<DIR>Image call.
 */
Assumes the base of the image is at its mid-left point. This isn't a problem
if you're drawing your images with the appropriated DrawImage call.
Assumes the base of the image is at its mid - left point . This isn ' t a problem if you ' re drawing your images with the appropriated DrawImage call .
static struct Float2
CenterForBaseAt(const struct Image *img,
                float base_x, float base_y,
                float sin_angle, float cos_angle)
{
  float x = base_x + (img->h * cos_angle)/2.0f;
  float y = base_y + (img->h * sin_angle)/2.0f;
  return (struct Float2) {x, y};
}
static struct Float2 CenterForBaseAt ( const struct Image * img , float base_x , float base_y , float sin_angle , float cos_angle ) { float x = base_x + ( img -> h * cos_angle ) / 2.0f ; float y = base_y + ( img -> h * sin_angle ) / 2.0f ; return ( struct Float2 ) { x , y } ; }
Assumes the base of the image is at its mid-left point.
Assumes the base of the image is at its mid - left point .