POV-Ray : Newsgroups : povray.off-topic : Unexpected : Re: Unexpected Server Time
28 Jul 2024 22:29:08 EDT (-0400)
  Re: Unexpected  
From: clipka
Date: 20 Aug 2013 11:30:46
Message: <52138ba6@news.povray.org>
Am 20.08.2013 16:33, schrieb scott:
>>> int abs(int input)
>>>> {
>>>> int value = 0;
>>>> for (int n = input; n != 0; n++)
>>>> {
>>>> value++;
>>>> }
>>>> return value;
>>>> }
>>>
>>> That's a pretty epic fail.
>>
>> As I say, the impressive thing is that it's a correct (yet inefficient)
>> implementation of negate().
>
> Yes, there must be a prize for that somewhere,

http://www.ioccc.org/

(Okay, this is for C code, not C#, but it should be easy enough to port 
the function)


Post a reply to this message

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