result
is float
and I could code this three ways:
if (result < 0)
if (result < 0.)
if (result < 0.f)
As I understand it,
0
is implicitlyint
,0.
is implicitlydouble
- and
0.f
isfloat
.
I'd prefer to use the first method since it is clear and simple but am I forcing a type conversion by using it?