How would you test whether a number was even or odd in POV 3.1?
Post a reply to this message
"Mahalis" wrote: > How would you test whether a number > was even or odd in POV 3.1? (N/2=int(N/2)) Rune -- 3D images and anims, include files, tutorials and more: Rune's World: http://rsj.mobilixnet.dk (updated June 26) POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/ POV-Ray Webring: http://webring.povray.co.uk
Yes!! Thank you! "Rune" <run### [at] mobilixnetdk> wrote in message news:3bc0b8b1@news.povray.org... > "Mahalis" wrote: > > How would you test whether a number > > was even or odd in POV 3.1? > > (N/2=int(N/2)) > > Rune > -- > 3D images and anims, include files, tutorials and more: > Rune's World: http://rsj.mobilixnet.dk (updated June 26) > POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/ > POV-Ray Webring: http://webring.povray.co.uk > >
> > How would you test whether a number > > was even or odd in POV 3.1? > > (N/2=int(N/2)) That looks slow... What about (mod(N, 2) = 0)? Anders