POV-Ray : Newsgroups : povray.general : function please : Re: function please Server Time
7 Aug 2024 01:26:57 EDT (-0400)
  Re: function please  
From: Trevor Quayle
Date: 21 Dec 2001 09:51:16
Message: <3c234c64@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3c2349fa$1@news.povray.org...
> what function would return 1 when x = 0 but 0 when abs(x)>=1 ?


Try:

max(floor(1-abs(x)),0)

-tgq


Post a reply to this message

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