POV-Ray : Newsgroups : povray.advanced-users : Instantiation and terminiation....OOP & Povray? : Re: Instantiation and terminiation....OOP & Povray? Server Time
28 Jul 2024 10:32:00 EDT (-0400)
  Re: Instantiation and terminiation....OOP & Povray?  
From: Trevor G Quayle
Date: 25 Jan 2006 15:00:00
Message: <web.43d7d7d71030ca216c4803960@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Darren New <dne### [at] sanrrcom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.