problem with my c++ project!!!
Hi
im new to programming. i couldnt solve the following problem.
A plane is moving on x axis.
For example it moves to (5000,0) than (6000,0). I wrote a functions to calculates fuel.
....
....
man->MinusX( man->GetX() ); ......1
man->Setfuel( man->GetMinX()/man->GetHiz()*man->Getfuelconst() );.....2
mane->Addfuel( man->Getfuel() ); .....3
...
...
void Man:MinusX(float a){SetMinX(a - minx);}
...
...
my problem is;if plane moves forward than backwards 2 dont calculates fuel correctly.
I want to implant a simple solution bu i couldnt find it.
Thanks.