RNG: Difference between revisions

1,019 bytes removed ,  20 October 2018
Line 39: Line 39:
===[[Tick Tock Clock]] Random Setting Only===
===[[Tick Tock Clock]] Random Setting Only===
The following objects call RNG under the given circumstances when the clock was entered at 6:00 (the random setting).
The following objects call RNG under the given circumstances when the clock was entered at 6:00 (the random setting).
* [[Spinner]]s call RNG twice when they stop spinning<ref>https://www.youtube.com/watch?v=MiuLeTE2MeQ</ref>. The first call determines direction. If the result is less than 32768, the spinner spins clockwise, and otherwise counterclockwise. The second call determines intended angular displacement. Spinners calculate their intended angular displacement by the following formula, in which % denotes the [[wikipedia:modulo operation|modulo function]]:
* [[Spinner#Random Setting|Spinners]]
<nowiki>Intended Angular Displacement = (RNG % 4) * 30 + 30</nowiki>
 
The following is a table summarizing this information, with probabilities of the individual states in parentheses:
{| class="wikitable"
|-
! [[Spinner]] intended CW ang disp ([[AU]]) !! RNG2 % 4 = 0 (24.982339%) !! RNG2 % 4 = 1 (24.999232%) !! RNG2 % 4 = 2 (25.008447%) !! RNG2 % 4 = 3 (25.009982%)
|-
| '''RNG1 ≥ 32768 (49.983107%)'''|| -30 (12.485794%) || -60 (12.490401%) || -90 (12.501152%) || -120 (12.505759%)
|-
| '''RNG1 < 32768 (50.016893%)'''|| 30 (12.496545%) || 60 (12.508831%) || 90 (12.507295%) || 120 (12.504223%)
|}
* [[Cogs]] call RNG twice when they reach their target [[angular velocity]] (TAV)<ref>https://www.youtube.com/watch?v=S0q3_toE3b4</ref>. The cog approaches its TAV with an angular acceleration of ±50AU/frame². The first call determines the cog's next TAV. Because of the way the formula is structured, there is a possibility that the TAV is 0. If this occurs multiple times, the cog can stand still. The TAV is calculated by the following formula:
* [[Cogs]] call RNG twice when they reach their target [[angular velocity]] (TAV)<ref>https://www.youtube.com/watch?v=S0q3_toE3b4</ref>. The cog approaches its TAV with an angular acceleration of ±50AU/frame². The first call determines the cog's next TAV. Because of the way the formula is structured, there is a possibility that the TAV is 0. If this occurs multiple times, the cog can stand still. The TAV is calculated by the following formula:
  <nowiki>Target Angular Velocity = (RNG % 7) * 200</nowiki>
  <nowiki>Target Angular Velocity = (RNG % 7) * 200</nowiki>