*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#include <stdlib.h>
/* statics from pretty_move */
float distt;
float distt2;
- float rot; /* entre 0 et 2 * M_PI */
+ float rot; /* entre 0 et 2 * G_PI */
int happens;
int rotation;
int lock;
data->distt = 10.0f;
data->distt2 = 0.0f;
- data->rot = 0.0f; /* entre 0 et 2 * M_PI */
+ data->rot = 0.0f; /* entre 0 et 2 * G_PI */
data->happens = 0;
data->rotation = 0;
*dist = fx_data->distt = (tmp + 3.0f * fx_data->distt) / 4.0f;
if (!fx_data->happens) {
- tmp = M_PI * sin (cycle) / 32 + 3 * M_PI / 2;
+ tmp = G_PI * sin (cycle) / 32 + 3 * G_PI / 2;
} else {
fx_data->rotation =
goom_irand (goomInfo->gRandom,
500) ? fx_data->rotation : goom_irand (goomInfo->gRandom, 2);
if (fx_data->rotation)
- cycle *= 2.0f * M_PI;
+ cycle *= 2.0f * G_PI;
else
- cycle *= -1.0f * M_PI;
- tmp = cycle - (M_PI * 2.0) * floor (cycle / (M_PI * 2.0));
+ cycle *= -1.0f * G_PI;
+ tmp = cycle - (G_PI * 2.0) * floor (cycle / (G_PI * 2.0));
}
- if (abs (tmp - fx_data->rot) > abs (tmp - (fx_data->rot + 2.0 * M_PI))) {
- fx_data->rot = (tmp + 15.0f * (fx_data->rot + 2 * M_PI)) / 16.0f;
- if (fx_data->rot > 2.0 * M_PI)
- fx_data->rot -= 2.0 * M_PI;
+ if (fabs (tmp - fx_data->rot) > fabs (tmp - (fx_data->rot + 2.0 * G_PI))) {
+ fx_data->rot = (tmp + 15.0f * (fx_data->rot + 2 * G_PI)) / 16.0f;
+ if (fx_data->rot > 2.0 * G_PI)
+ fx_data->rot -= 2.0 * G_PI;
*rotangle = fx_data->rot;
- } else if (abs (tmp - fx_data->rot) > abs (tmp - (fx_data->rot - 2.0 * M_PI))) {
- fx_data->rot = (tmp + 15.0f * (fx_data->rot - 2.0 * M_PI)) / 16.0f;
+ } else if (fabs (tmp - fx_data->rot) >
+ fabs (tmp - (fx_data->rot - 2.0 * G_PI))) {
+ fx_data->rot = (tmp + 15.0f * (fx_data->rot - 2.0 * G_PI)) / 16.0f;
if (fx_data->rot < 0.0f)
- fx_data->rot += 2.0 * M_PI;
+ fx_data->rot += 2.0 * G_PI;
*rotangle = fx_data->rot;
} else
*rotangle = fx_data->rot = (tmp + 15.0f * fx_data->rot) / 16.0f;