HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file util.RandomInt by barry
expand copy to clipboardexpand
/*
 {"description" : "Generate random or pseudo-random numbers. The setSeed() function should generally be used once (after instantiation) to ensure a unique starting point for the sequence of numbers returned by successive calls to get(). The current time is commonly used with setSeed(). If setSeed() is not used, each instance of the random number generator may return the same sequence of numbers.",
 "@deprecated" : "true", "@deprecatedBy" : "util.Random", "@deprecatedOn" : "2020/01/01"}
*/

interface RandomInt{
	/*
	 {"@description" : "Set a 'seed' value for the random number generator. Some implementations may generate the same sequence of numbers from the same seed, so this should generally be set from something like the current time to help ensure good pseudo-random numbers."}
	*/
	void setSeed(int s)
	
	/*
	 {"@description" : "Get a pseudo-random number between zero and 'top', excluding top itself."}
	*/
	int get(int top)
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n util.RandomInt -m "reason for update" -u yourUsername
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation