summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/random-var.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix bat form unarmed delay display being randomised.Raphael Langella2013-02-041-0/+1
|
* Use std namespace.Raphael Langella2012-08-261-2/+2
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Remove parentheses around return (simple_function_call).Adam Borowski2012-07-051-1/+1
| | | | For way too paranoid and underinclusive values of "simple".
* Implement div_rand_round() for random_var, use it for combat delay.Adam Borowski2011-09-191-0/+1
| | | | | | Two constants divide to the same value no matter the scale, using random_var was just a waste of CPU. What we want is to allow partial values a percentage of the time.
* Integer random variables.Robert Vollmert2010-04-151-0/+58
Using these to get at random values is quite inefficient, but it allows computing expected values for complicated formulas like those used in fight.cc.