POV-Ray : Newsgroups : povray.unofficial.patches : Max and Min : Re: Max and Min Server Time
2 Sep 2024 00:13:13 EDT (-0400)
  Re: Max and Min  
From: Christoph Hormann
Date: 30 Aug 2000 11:24:11
Message: <39AD2759.9ABCA2C3@schunter.etc.tu-bs.de>
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

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