hedgewars/uRandom.pas
changeset 7579 51724c98a74f
parent 7577 bdbb072b38b9
child 8026 4a4f21070479
child 8912 78ea1839aac9
equal deleted inserted replaced
7577:bdbb072b38b9 7579:51724c98a74f
    27  * without causing a desynchronisation of different clients when playing over
    27  * without causing a desynchronisation of different clients when playing over
    28  * a network.
    28  * a network.
    29  *)
    29  *)
    30 interface
    30 interface
    31 uses uFloat;
    31 uses uFloat;
    32 
       
    33 procedure initModule;
       
    34 procedure freeModule;
       
    35 
    32 
    36 procedure SetRandomSeed(Seed: shortstring); // Sets the seed that should be used for generating pseudo-random values.
    33 procedure SetRandomSeed(Seed: shortstring); // Sets the seed that should be used for generating pseudo-random values.
    37 function  GetRandomf: hwFloat; overload; // Returns a pseudo-random hwFloat.
    34 function  GetRandomf: hwFloat; overload; // Returns a pseudo-random hwFloat.
    38 function  GetRandom(m: LongWord): LongWord; overload; inline; // Returns a positive pseudo-random integer smaller than m.
    35 function  GetRandom(m: LongWord): LongWord; overload; inline; // Returns a positive pseudo-random integer smaller than m.
    39 procedure AddRandomness(r: LongWord); inline;
    36 procedure AddRandomness(r: LongWord); inline;