Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MajorIdea on July 20, 2014, 06:57:59 PM

Title: Random float -x/+x [SOLVED]
Post by: MajorIdea on July 20, 2014, 06:57:59 PM
Hi,

Is there any way of generating both the positive and negative version of a random float?

I tried doing the simple math (get the random float value, multiply by 2 and subtract the original by the multiplication) but there doesn't appear to be a way to store the results.
Title: Re: Random float -x/+x
Post by: escpodgames on July 20, 2014, 07:34:52 PM
Multiply the random float by -1 (using a float operator action)
Title: Re: Random float -x/+x
Post by: MajorIdea on July 21, 2014, 06:16:24 AM
Good ol' Float Operator. How did I forget about it! :D  Thanks!