X = modf(modf(x, ¬Used) + 1, ¬Used) It is deterministic on all platforms and the value is almost the same as the value of standard sin (both tested). This is my modification of the code I got ( ) for the sin function. So the only solution that I came up with was to use our own custom code to calculate these values, the problem is, that (surprisingly) it is very hard to find any easy to use source code for all the set of the trigonometric functions. Any small error could result in bigger and bigger error over time and also the crc of the game state is used as check of synchronisation). These clients need to have the state of the simulation exactly the same to make it work. (Edit: the results need to be exactly the same to the last bit as it is used in game simulation that is ran on all the clients. It was tested, that the result values are different. ![]() ![]() For program that needs to be deterministic and provide the same result on different platforms (compilers), the built-in trigonometric functions can't be used, since the algorithm to compute it is different on different systems.
0 Comments
Leave a Reply. |