|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" <gre### [at] my-dejanewscom> wrote in message
news:39AD1C3E.5EC11E2F@my-dejanews.com...
> Chris Huff wrote:
>
> > They take two parameters. Min returns the lesser(minimum) of the two,
> > and max returns the greater(maximum) of the two. The order of the
> > parameters does not matter.
>
> You're sure you don't have to put the smaller one in first?
But how do you know which is smaller? Don't they probably change? (And if
you do know and they don't change, why are using max and min). Here's your
badge I believe.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
: You're sure you don't have to put the smaller one in first?
#macro GimmeTheMinimumOf(A, B)
#if (A<B)
#local result = min(A, B);
#else
#local result = min(B, A);
#end
result
#end
(Hmm... a new form of povray humor?-) )
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
>
> #macro GimmeTheMinimumOf(A, B)
> #if (A<B)
> #local result = min(A, B);
> #else
> #local result = min(B, A);
> #end
> result
> #end
>
> (Hmm... a new form of povray humor?-) )
>
:-)
Although 'result' seems unnecessary and I prefer a bit of insecurity:
#declare Rnd=seed(1);
#macro I_am_not_so_sure_about_things(A, B)
#if (rand(Rnd)<0.5)
min(A, B)
#else
min(B, A)
#end
#end
Christoph
--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
OH COME ON you guys! I was poking fun at Chris' overly obvious statement:
it doesn't matter in which order you put the terms.
Chris Huff wrote:
> In article <39AD1C3E.5EC11E2F@my-dejanews.com>,
> gre### [at] my-dejanewscom wrote:
>
> > You're sure you don't have to put the smaller one in first?
>
> I'm sure. It would kind of defeat the purpose of these functions if you
> had to know which one was smaller. :-)
>
> --
> Christopher James Huff
> Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
> TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
>
> <><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <39AD526E.C1139BBE@my-dejanews.com>,
gre### [at] my-dejanewscom wrote:
> OH COME ON you guys! I was poking fun at Chris' overly obvious statement:
> it doesn't matter in which order you put the terms.
Oh.
(mutters something about the lack of expression in text messages)
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann <Chr### [at] schunteretctu-bsde> wrote:
: Although 'result' seems unnecessary
It is very necessary. Without it, something like this will not work:
#declare Val = GimmeTheMinimumOf(Var1, Var2) + 5;
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" <gre### [at] my-dejanewscom> wrote in message
news:39AD526E.C1139BBE@my-dejanews.com...
> OH COME ON you guys! I was poking fun at Chris' overly obvious statement:
> it doesn't matter in which order you put the terms.
>
Oh. Well, don't worry - I once made some flippant remark about the Magna
Carta and had to put up with history lessons for a week.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tom Melly wrote:
> Oh. Well, don't worry - I once made some flippant remark about the Magna
> Carta and had to put up with history lessons for a week.
:)
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote:
> (mutters something about the lack of expression in text messages)
Oh, I've often thought the best jokes are served with a dry serious tone; they
are ruined by someone who already thinks it's funny and has an overly goofy
grin.
greg, curmudgeon jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
>
> Christoph Hormann <Chr### [at] schunteretctu-bsde> wrote:
> : Although 'result' seems unnecessary
>
> It is very necessary. Without it, something like this will not work:
>
> #declare Val = GimmeTheMinimumOf(Var1, Var2) + 5;
>
You seem to be right, but i do not really understand why (the '+5' does not seem
to have anything to do with it).
Christoph
--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |