How about
scale*(2.0*(rnd.nextFloat())-1.0)
?

stuart wrote:

>Hi,
>
>My prog requires random graph coordinates. I am creating a Random sequence
>and then pulling them off the sequence using nextFloat(). Does anyone know
>how to randomise the sign (positive or negative)?
>
>Thanks in Advance
>
>Stuart
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to