POV-Ray : Newsgroups : povray.general : function please : Re: function please Server Time
7 Aug 2024 01:26:13 EDT (-0400)
  Re: function please  
From:
Date: 21 Dec 2001 09:52:39
Message: <5ki62u89r6gbkviclcib1imr8vvk60bqg2@4ax.com>
On Fri, 21 Dec 2001 14:40:58 -0000, "Tom Melly" <tom### [at] tomandlucouk> wrote:
> what function would return 1 when x = 0 but 0 when abs(x)>=1 ?

#include "math.inc"
#declare f_for_tom=function(x){clip(1-abs(x),0,1)}

is it good ?

ABX


Post a reply to this message

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