I am using eclipse and I will ask a stupid question: why the error? code should be ok. I guess I'm just getting old. I just don't see the error. all the {} match.
What the code does it sets the hemisphere for geolocation in a flight simulator, as the math should not have negative numbers.
so here goes:
O_lat is tested for zero or a positive number
if positive don't mess with it. and make quadrant = 1
else its negative so we make it positive and make the quadrant = 0
that's it.
int vns1, vew1, vns2, vew2;
if( O_lat >= 0 ){
{ vns1 = 1; }
else {
vns1 = 0;
O_lat = O_lat * -1; }}
Aucun commentaire:
Enregistrer un commentaire