I'm just wondering about something. Is it possible to use rather weird formulas to generate random numbers, formulas that cause variable overflow and use variables users have little control over? For example (the concept):
Code:
int randomize(int min_range, int max_range, float seed)
{
int result;
// obtain time since program has started (likely in milliseconds, maybe microseconds; as a float)
// obtain current system time (minutes and seconds values; as a char)
// obtain another variable or two one doesn't have control over and is hidden, from 0.001 to 16
seed %= 1E09; // up to a billion
program_time %= 5;
result = ((pow(another_var, program_time) + system_time*another_var * seed) % (max_range+min_range)) + min_range;
return (result);
}
Would the idea work? Would it be safe to do (considering variable overflow is a near-certainty)?