Salome HOME
test data have been changed
[modules/hydro.git] / src / HYDRO_tests / random.cxx
1
2 #include <random.h>
3
4 quint32 m_w = 1;
5 quint32 m_z = 1;
6
7 void test_srand( quint32 theValue )
8 {
9   m_w = theValue + 1;
10   m_z = theValue / 2;
11 }
12
13 quint32 test_rand()
14 {
15   m_z = 36969 * (m_z & 65535) + (m_z >> 16);
16   m_w = 18000 * (m_w & 65535) + (m_w >> 16);
17   return (m_z << 16) + m_w;  /* 32-bit result */
18 }