I am starting to get the hang of this, I promise. I just wanted to get some clarifications on how certain things behave. I've prepared a tiny sample snippet based on a trigger I made recently to refer to below:
Example:
Set "RandomReal to a random real number b/w (number1) & (number2)"
If RandomReal is less than (some number), save 0 as 0 of 0 in Hashtable, else...
If Random Real is greater than (some number), save 1 as 0 of 0 in Hashtable.
Set "RandomReal to a random real number b/w (number1) & (number2)"
If RandomReal is less than (some number), save 0 as 0 of 1 in Hashtable, else...
If Random Real is greater than (some number), save 1 as 0 of 1 in Hashtable.
There is nothing wrong with doing this example above, right? The only issue is if I wanted to use the first value again later on, since I overwrite it?
As a final question: Converting reals to integers, they'll just round, right?
- When I "Set RandomReal = (Random real number between 0.00 and 100.00)," can the value returned be any number between 0.00 and 100.00? [1.08, 46.23, 99.99, 45.00, 10.01, etc.?]
- Do these potential values actually include 0.00 and 100.00? The same question goes for random integers, if I use "Random Integer between 3 and 6," are the possible integers = 3, 4, 5, and 6?
Example:
Set "RandomReal to a random real number b/w (number1) & (number2)"
If RandomReal is less than (some number), save 0 as 0 of 0 in Hashtable, else...
If Random Real is greater than (some number), save 1 as 0 of 0 in Hashtable.
Set "RandomReal to a random real number b/w (number1) & (number2)"
If RandomReal is less than (some number), save 0 as 0 of 1 in Hashtable, else...
If Random Real is greater than (some number), save 1 as 0 of 1 in Hashtable.
There is nothing wrong with doing this example above, right? The only issue is if I wanted to use the first value again later on, since I overwrite it?
As a final question: Converting reals to integers, they'll just round, right?
-
Ir Copy
-
Events
-
Conditions
-
Actions
-
Set RandomReal = (Random real number between 0.00 and 100.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RandomReal Less than or equal to 2.70
-
-
Then - Actions
-
Set TempInteger1 = 0
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RandomReal Greater than 2.70
-
RandomReal Less than or equal to 5.48
-
-
Then - Actions
-
Set TempInteger1 = 1
-
-
Else - Actions
-
-
-
-
-