Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » random functions proposal
Re: random functions proposal [message #35151 is a reply to message #35147] Tue, 17 January 2012 12:58 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Mirek.
mirek wrote on Tue, 17 January 2012 11:13


BTW, what IS actually missing is double Randomf(); (returning 0 < x < 1)


Something like this?
// Returns random value from 0 to 1 - 10^-9 with 10^-9 precision.
double Randomf()
{
	static const dword n = 1000000000;
	return double(Random(n)) / n;
}

[Updated on: Tue, 17 January 2012 13:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Init a ctrl inside INITBLOCK
Next Topic: problem with new and delete
Goto Forum:
  


Current Time: Sat May 04 18:23:31 CEST 2024

Total time taken to generate the page: 0.03062 seconds