Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!cbmvax!vu-vlsi!swatsun!platt From: platt@cs.swarthmore.edu (Steve Platt) Newsgroups: comp.graphics Subject: Re: Pixar's noise function Keywords: random numbers, Byte, elephants Message-ID: <2755@babylon.cs.swarthmore.edu> Date: 24 Apr 89 00:25:31 GMT References: <2553@ssc-vax.UUCP> <3599@pixar.UUCP> <97699@sun.Eng.Sun.COM> <1592@ccncsu.ColoState.EDU> <43327@tut.cis.ohio-state.edu> <1648@ccncsu.ColoState.EDU> <1771@skinner.nprdc.arpa> <1669@ccncsu.ColoState.EDU> <465@celia.UUCP> Reply-To: platt@babylon.UUCP (Steve Platt) Organization: SUN Lab, Swarthmore College, PA Lines: 10 Off the top of my head, int floor(x) double x; { if (x>=0) return(trunc(x)); else return(-trunc(-x)); } seems to do the trick.