Ignore:
Timestamp:
11/07/14 17:51:01 (9 years ago)
Author:
Maciej Komosinski
Message:

Sources support both 32-bit and 64-bit, and more compilers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/rndutil.cpp

    r197 r247  
    55#include "rndutil.h"
    66#include <common/nonstd_math.h>
     7#include <cstdint>
    78#include <stdlib.h>
    89
    910unsigned short pseudornd(short x)
    1011{
    11         static long seed = 0;
    12         long y;
     12        static int32_t seed = 0;
     13        int32_t y;
    1314        if (x <= 0) { seed = -x; return 0; }
    1415        seed = (y = (3677 * seed + 3680) & 0x7fffffff) - 1;
Note: See TracChangeset for help on using the changeset viewer.