double root;
root = pow(v0,4.0) - (gravity*(gravity*pow((player.x-x),2.0)+(2.0*(-player.y+y)*pow(v0,2.0))));
if((root)<0)
{
r=0;
root=0;
}
else
{
r=255;
root = sqrt(root);
}
angle = radtodeg(atan(((pow(v0,2.0)) - root)/((gravity*(player.x-x)))));
if(player.x<x)
{
angle+=180;
}
textdisp.textNumber=angle;
angle = radtodeg(atan(((pow(v0,2.0)) - root)/((gravity*(player.x-x))))) + rand(30) - rand(30);
double root;
root = pow(v0,4.0) - (gravity*(gravity*pow((Character.x-x),2.0)+
(2.0*(-Character.y+y)*pow(v0,2.0))));
if((root)<0)
{
r=0;
root=0;
}
else
{
r=255;
root = sqrt(root);
}
tangle = radtodeg(atan(((pow(v0,2.0)) - root)/((gravity+0.000000000017*(Character.x-x)))));
if(Character.x<x)
{
angle+=180;
}
animpos= angle/22.5+0.3;
Users browsing this forum: No registered users and 1 guest