mirror of https://github.com/OpenTTD/OpenTTD
(svn r16148) -Fix [FS#2839]: misleading comment (part by Bilbo)
parent
dec40e5501
commit
25ecace01b
|
@ -126,16 +126,14 @@ static FORCEINLINE bool Chance16I(const uint a, const uint b, const uint32 r)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flips a coin with a given probability.
|
* Flips a coin with given probability.
|
||||||
*
|
*
|
||||||
* This macro can be used to get true or false randomized according to a
|
* This function returns true with (a/b) probability.
|
||||||
* given probability. The parameter a and b create a percent value with
|
|
||||||
* (a/b). The macro returns true in (a/b) percent.
|
|
||||||
*
|
*
|
||||||
* @see Chance16I()
|
* @see Chance16I()
|
||||||
* @param a The numerator of the fraction
|
* @param a The nominator of the fraction
|
||||||
* @param b The denominator of the fraction
|
* @param b The denominator of the fraction
|
||||||
* @return True in (a/b) percent
|
* @return True with (a/b) probability
|
||||||
*/
|
*/
|
||||||
static FORCEINLINE bool Chance16(const uint a, const uint b)
|
static FORCEINLINE bool Chance16(const uint a, const uint b)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue