U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Wed Aug 05 07:39:28 GMT+2 2026

Total time taken to generate the page: 0.00717 seconds