digitalmars.D.bugs - [Issue 2951] New: std.random.dice() should be templated on proportions.
- d-bugmail puremagic.com (20/20) May 07 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2951
- d-bugmail puremagic.com (10/10) Oct 11 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2951
- d-bugmail puremagic.com (11/11) Aug 16 2010 http://d.puremagic.com/issues/show_bug.cgi?id=2951
http://d.puremagic.com/issues/show_bug.cgi?id=2951 Summary: std.random.dice() should be templated on proportions. Product: D Version: 2.029 Platform: PC OS/Version: Windows Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: bugzilla digitalmars.com ReportedBy: dsimcha yahoo.com The current signature for std.random.dice() is: size_t dice(R)(ref R rnd, double[] proportions...); Correct me if I'm wrong, but I think it would be trivial to change it to something like: size_t dice(T)(ref R rnd, T[] proportions...); This way, if you're passing in a pre-existing array instead of treating dice as a variadic function, you won't have to convert it. --
May 07 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2951 Andrei Alexandrescu <andrei metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |andrei metalanguage.com AssignedTo|nobody puremagic.com |andrei metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 11 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2951 David Simcha <dsimcha yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Fixed SVN. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 16 2010