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 #35147 is a reply to message #35146] Tue, 17 January 2012 11:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13986
Registered: November 2005
Ultimate Member
ratah wrote on Tue, 17 January 2012 03:56

Thank you for your reply,

Dolik.rce, I aggree with you for the use of cos and dword conversion. The idea of scaling is because I do not know it is possible to pass a parameter to Random(). So I could not limit the max value I get with Random().

Dolik.rce, Sender Ghost, all of your solutions are OK.
Why not to introduce that usefull function into Core?

Best regards,

Ratah


I think that with Random(n), it is really not much useful to add second parameter.

BTW, what IS actually missing is double Randomf(); (returning 0 < x < 1) - but with all bells and whistles... which might be a little bit harder than it seems to be done correctly.
 
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: Tue Jun 18 15:46:42 CEST 2024

Total time taken to generate the page: 0.01918 seconds