double RandOrgRange = 1; // 0 to 2, default is 1
DPOINT RandOrgBias = {0, 0}; // -.5 to .5, default is 0
double ofs = (1 - RandOrgRange) / 2;
m_TargetOrg.x = double(rand()) / RAND_MAX
* RandOrgRange + ofs + RandOrgBias.x;
m_TargetOrg.y = double(rand()) / RAND_MAX
* RandOrgRange + ofs + RandOrgBias.y;
Friday, November 11, 2005
limiting random origin motion
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment