Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/atlantis/swim.c
changeset 2220 4d2d0548f5b2
parent 2213 59a667370c57
     1.1 --- a/Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/atlantis/swim.c	Fri Aug 10 16:03:35 2007 +0000
     1.2 +++ b/Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/atlantis/swim.c	Sat Aug 11 18:51:12 2007 +0000
     1.3 @@ -35,7 +35,7 @@
     1.4   * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
     1.5   */
     1.6  #include <math.h>
     1.7 -#include <stdlib.h>             /* For rand(). */
     1.8 +#include <stdlib.h>  /* For rand(). */
     1.9  #include <GLUT/glut.h>
    1.10  #include "atlantis.h"
    1.11  
    1.12 @@ -57,10 +57,8 @@
    1.13      fish->theta = 0.0;
    1.14      fish->psi -= 0.5;
    1.15  
    1.16 -    fish->x +=
    1.17 -        WHALESPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
    1.18 -    fish->y +=
    1.19 -        WHALESPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
    1.20 +    fish->x += WHALESPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
    1.21 +    fish->y += WHALESPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
    1.22      fish->z += WHALESPEED * fish->v * sin(fish->theta / RAD);
    1.23  }
    1.24  
    1.25 @@ -154,10 +152,8 @@
    1.26          }
    1.27      }
    1.28  
    1.29 -    fish->x +=
    1.30 -        SHARKSPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
    1.31 -    fish->y +=
    1.32 -        SHARKSPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
    1.33 +    fish->x += SHARKSPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
    1.34 +    fish->y += SHARKSPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
    1.35      fish->z += SHARKSPEED * fish->v * sin(fish->theta / RAD);
    1.36  }
    1.37