Re: rand for tiny-fu

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


Rob Antonishen wrote:
> is there a floating point rand function for tiny-fu?
> (rand 1.0) returns 0 and (rand x) where x<1.0 returns a modulo divide
> by zero error

The rand and random functions only return exact (integer) values.

(rand . modulus)
Computes a random number from 0 to modulus-1. If modulus is not specified, it 
returns a value in the range of 0 to 2^31-1

(random modulus)
Computes a random number from 0 to modulus-1. Unlike the rand function, 
modulus is not optional.


Kevin.           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg


Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    (Yahoo! ID required)

<*> To change settings via email:

<*> To unsubscribe from this group, send an email to:

<*> Your use of Yahoo! Groups is subject to:

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

&hbsp; Powered by Linux