And squareroots are way more expensive than any mult/sub/add/mod/bitshift And people do those every frame all the time. things like calculating the distance between 2 objects in 3d-space is probably more expensive (3 subtractions, 3 squares, 2 additions, 1 squareroot). So I doubt 5 or so of them is all that bad. When your CPU says it does 2ghz, it means that it can do 2 billion of any of those operations per second.
All things your processor can do VERY FAST. but it's usually just some multiplication/modulo/addition/bit shifting. The algorithm of the random number dictates what that arithmetic is. The processor only calculates the next random number when you ask it too.Īnd that calculation isn't really all that difficult to calculate.