POV-Ray : Newsgroups : povray.off-topic : It's a riddle : Re: It's a riddle Server Time
11 Oct 2024 05:19:52 EDT (-0400)
  Re: It's a riddle  
From: Invisible
Date: 7 Feb 2008 11:07:20
Message: <47ab2cb8$1@news.povray.org>
Mike the Elder wrote:
> Invisible <voi### [at] devnull> wrote:
> 
>> OMG... That's like... sublime!
> 
>> In fact, you know what? I think even *normal* people might be able to
>> comprehend this code. w00t!
> 
> My gosh, you're right!  We can't have THAT.  Crunch code to the rescue:
> 
> #macro Gen_WN(YE) #declare WN = 1+3*(YE>.5) + (YE>4) * int(YE-4) +( YE>12) *
> int(12-YE); #debug concat("WN=",str(WN))#end

GAH! >_<


find_weeks_notice :: Double -> Integer
find_weeks_notice years_worked
   | years_worked < 0.5 = 1
   | years_worked < 4   = 4
   | otherwise          = 12 `max` floor years_worked

Much better. :-D

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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