T2-AAConstruction/scripts/modScripts/XLib_numericProcessing.cs

18 lines
595 B
PHP
Raw Permalink Normal View History

2016-02-22 17:04:31 +00:00
//------------------------------------------------------------------------------
// 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; }