T2-AAConstruction/scripts/modScripts/XLib_numericProcessing.cs
Robert MacGregor 23fed9edb7 Initial commit.
2016-02-22 12:04:31 -05:00

18 lines
595 B
PHP
Executable file

//------------------------------------------------------------------------------
// Numeric Processing (C) 2010 Robert MacGregor (AKA Dark Dragon DX)
//------------------------------------------------------------------------------
function getRandomVector(%min,%max)
{
return getRandom(%min,%max) SPC getRandom(%min,%max) SPC getRandom(%min,%max);
}
function getRandomVectorAt(%vec,%min,%max)
{
return vectorAdd(%vec,getRandomVector(%min,%max));
}
function decimalToPercent(%decimal){ return %decimal * 100; }
function percentToDecimal(%percent){ return %percent / 100; }