Re: rand for tiny-fu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-------- Original-Nachricht --------
> Datum: Tue, 20 May 2008 23:39:20 -0400
> Von: "Rob Antonishen" <rob.antonishen@xxxxxxxxx>
> An: script-fu@xxxxxxxxxxxxxxx
> Betreff:  rand for tiny-fu

> is there a floating point rand function for tiny-fu?

There is a SRFI about random number generators, http://srfi.schemers.org/srfi-27/srfi-27.html
 
> (rand 1.0) returns 0 and (rand x) where x<1.0 returns a modulo divide
> by zero error

if you want a 0.0 to 1.0 range, then something like (/ (rand 100) 100) should do.


HTH,
Michael
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

[Index of Archives]     [Gimp Developers]     [Gimp Users]     [Yosemite News]     [Epson Inkjet Printers]     [Scanners]     [Gimp's Home]     [Steve's Art]

&hbsp; Powered by Linux