- I need help in storing a random value between 2 comma values
- 27 Mar 2021 01:31:47 pm
- Last edited by DAVID-19 on 03 Apr 2021 08:38:58 am; edited 2 times in total
Hello, I`m trying to get a random value between a negative comma value and a positive (comma) value.
For example between -2.5 and 1.5.
I can use for this:
Code:
But this is not very efficient (especially in a loop which should work fast),
so does somebody know how to make it better?
Is it possible to use just one command and I missed something?
For example between -2.5 and 1.5.
I can use for this:
Code:
-2.5->A
1.5→B
B-A→C //C=difference of A and B
A+rand*C→R //R=random value between A and B
But this is not very efficient (especially in a loop which should work fast),
so does somebody know how to make it better?
Is it possible to use just one command and I missed something?