POV-Ray : Newsgroups : povray.unofficial.patches : Step function : Re: Step function Server Time
29 Apr 2024 02:45:34 EDT (-0400)
  Re: Step function  
From: Chris Huff
Date: 22 Aug 2000 10:59:33
Message: <chrishuff-84E935.10005522082000@news.povray.org>
In article <39A2016F.7B1ED0D2@usb.ve>, jac### [at] usbve wrote:

> Sorry, there is a simpler solution. Replace the previous macro by
...snip...
> No restriction in the domain of definition

You don't need a macro for this, a plain old function will do fine.

#declare Heaviside = function {if(x - y, 1, 0)}
// x=the value, y=the jump threshold, z=nothing

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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