You guys are talking about two different things. Random integer vs random float
You guys are talking about two different things. Random integer vs random float
Bit hacker 2 is really fascinating. It uses a bit mask of all 1s (-1) or all 0s (0) and takes advantage of the fact that y ^ (x ^ y) = x and y ^ 0 = y
Because you could argue that the series converges to …999999 in some sense
You can also prove it a different way if you allow the use of the formula for finding the limit of the sum of a geometric series on a non-convergent series.
Sum(ar^n, n=0, inf) = a/(1-r)
So,
…999999
= 9 + 90 + 900 + 9000…
= 9x10^0 + 9x10^1 + 9x10^2 + 9x10^3…
= Sum(9x10^n, n=0, inf)
= 9/(1-10)
= -1
Unity actually gives any class with the name GameManager a special gear icon. You cant just forgo the cool gear icon!
(Its not too terrible from an organizational standpoint because most of the scripts are attached to game objects. MonoBehavior is a component of GameObject. For instance, you’d never have player movement in the GameManager class, you would put it in the component class attached to the player character GameObject.)