Warp <war### [at] tag povray org> wrote:
> Darren New <dne### [at] san rr com> wrote:
> > #if ((0.25 < clock) & (clock < 0.75))
>
> The problem with that is that it's hard to understand.
>
> If you say to someone "if 25 is smaller than the amount of money in
> your wallet, you can come" he will probably have to stop for a moment
> to think about what that means.
>
> People don't say nor think "is 25 smaller than the money I have?" but
> they always think the other way around. That's why writing things like
> "if (25 < money)" makes code confusing.
>
> --
> - Warp
For only one value that is mostly true. However in the case of bracketing
values, it sandwiches the variable nicely so its easy to see ((0.25 <
clock) & (clock < 0.75)) as (0.25 < clock < 0.75).
-tgq
Post a reply to this message
|