I cannot figure this out for the life of me, but I only want the code executed within the if statement when the variable Range is < .16. Is there anything that I am writing incorrectly that is causing this to screw up (I'm thinking possibly due to rounding). Because I am getting executions within the if statement when Range is > .16
Question
NotSoSmartGuy
All these variables are defined as double. Here is my code
X = (A / B]) ;
Range = (X - m_Min12) / (m_Max12 - m_Min12);
if (Range < (16 / 100.0))
{
execute code!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
I cannot figure this out for the life of me, but I only want the code executed within the if statement when the variable Range is < .16. Is there anything that I am writing incorrectly that is causing this to screw up (I'm thinking possibly due to rounding). Because I am getting executions within the if statement when Range is > .16
Thanks
Link to comment
Share on other sites
5 answers to this question
Recommended Posts