This is an actual
if statement from my gravity program:if( (m_bRunEveryFrame || m_nFrameSkip <= 0) &&I think I may have a problem.
((m_aTrail[i].planet == -2 && m_ship.alive ) ||
sim.IsValidIndex(m_aTrail[i].planet) &&
sim.p[m_aTrail[i].planet].alive &&
(sim.nAlive == 2 || tCalm > 60 ||
m_aTrail[i].planet == m_nCurPlanet ||
m_aTrail[i].planet == m_nSecPlanet ||
(sim.p[m_aTrail[i].planet].stable &&
(sim.p[m_aTrail[i].planet].mass >= DUSTMASS*2 || sim.nAlive < 10)) )) )
{
//do something
}
else
{
//do something else
}
I've had if statements like that, but MINE were Comprehensible because I didn't use Hungarian notation. Boo Hiss.
ReplyDeleteDad (unemployed programmer)
You forgot to carry the 1.
ReplyDelete