A
almurph
Hi everyone
I have the following line of code in C:
((x) <= 0 ? 0.0 : 1.0)
I understand that this is shorthand for the following:
if(x <= 0)
{
return 0.0;
}
else
{
return 1.0;
}
what I am confused by is the brackets around the x like "(x)". I don't
know what this means. Can ayone help me with the interpretation
please? I would appreciate any comments/suggestions/explanations that
you may be able to offer.
Thanks,
Al.
I have the following line of code in C:
((x) <= 0 ? 0.0 : 1.0)
I understand that this is shorthand for the following:
if(x <= 0)
{
return 0.0;
}
else
{
return 1.0;
}
what I am confused by is the brackets around the x like "(x)". I don't
know what this means. Can ayone help me with the interpretation
please? I would appreciate any comments/suggestions/explanations that
you may be able to offer.
Thanks,
Al.