Archival snapshot of the Virtual World Entertainment Tesla cockpit software, 1994-1996: MUNGA engine and L4 pod layer source (Borland C++ 5.0), BT/RP game code, and game content (models, audio, maps, gauges, Division renderer data). Includes third-party libraries: Division dVS/DPL graphics, HMI SOS audio, WATTCP networking. Files are preserved byte-for-byte (.gitattributes disables all line-ending conversion). README.md documents the layout, target hardware, and toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
//===========================================================================//
|
|
// File: random.tst //
|
|
// Project: MUNGA Brick: Math Library //
|
|
// Contents: test function for the random number generator //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 11/20/93 JMA Initial coding. //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1993-1995, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
Logical
|
|
RandomGenerator::TestClass()
|
|
{
|
|
DEBUG_STREAM << "Starting Random test...\n";
|
|
|
|
#define RANDOM_TEST_COUNT 10000
|
|
|
|
int i;
|
|
for (i=0; i<RANDOM_TEST_COUNT; ++i)
|
|
{
|
|
Scalar r = Random;
|
|
Test_And_Dump(r >= 0.0f && r < 1.0f,r);
|
|
}
|
|
|
|
int array[10];
|
|
for (i = 0; i<ELEMENTS(array); ++i)
|
|
{
|
|
array[i] = 0;
|
|
}
|
|
|
|
for (i = 0; i<RANDOM_TEST_COUNT; ++i)
|
|
{
|
|
int r = Random(ELEMENTS(array));
|
|
Test(r >= 0 && r < ELEMENTS(array));
|
|
++array[r];
|
|
}
|
|
|
|
return True;
|
|
}
|
|
|