From c01469dddabe404506ef3a64542e8423f9e11f2c Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 30 Jan 2022 17:44:05 +0100 Subject: Converted Opcode and Ice into unix newlines format --- Opcode/Ice/IceRandom.cpp | 70 ++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'Opcode/Ice/IceRandom.cpp') diff --git a/Opcode/Ice/IceRandom.cpp b/Opcode/Ice/IceRandom.cpp index 8593399..305721d 100644 --- a/Opcode/Ice/IceRandom.cpp +++ b/Opcode/Ice/IceRandom.cpp @@ -1,35 +1,35 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains code for random generators. - * \file IceRandom.cpp - * \author Pierre Terdiman - * \date August, 9, 2001 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Precompiled Header -#include "StdAfx.h" - -using namespace IceCore; - -void IceCore:: SRand(udword seed) -{ - srand(seed); -} - -udword IceCore::Rand() -{ - return rand(); -} - - -static BasicRandom gRandomGenerator(42); - -udword IceCore::GetRandomIndex(udword max_index) -{ - // We don't use rand() since it's limited to RAND_MAX - udword Index = gRandomGenerator.Randomize(); - return Index % max_index; -} - +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * Contains code for random generators. + * \file IceRandom.cpp + * \author Pierre Terdiman + * \date August, 9, 2001 + */ +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Precompiled Header +#include "StdAfx.h" + +using namespace IceCore; + +void IceCore:: SRand(udword seed) +{ + srand(seed); +} + +udword IceCore::Rand() +{ + return rand(); +} + + +static BasicRandom gRandomGenerator(42); + +udword IceCore::GetRandomIndex(udword max_index) +{ + // We don't use rand() since it's limited to RAND_MAX + udword Index = gRandomGenerator.Randomize(); + return Index % max_index; +} + -- cgit v1.1