summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2000-12-19 15:57:53 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2000-12-19 15:57:53 +0000
commit32241715f42b437299282367f39becb0c8602d23 (patch)
tree435cfa8cad02b44a5a38f5fb9308dcc3b59ac805 /gmodule
parent2fb47703e2929d300a3f804268a36d50543b4a2c (diff)
downloadglib-32241715f42b437299282367f39becb0c8602d23.tar.gz
Updated G_RAND_DOUBLE_TRANSFORM to be more accurate. Redid g_rand_double()
2000-12-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * grand.c: Updated G_RAND_DOUBLE_TRANSFORM to be more accurate. Redid g_rand_double() such that it returns 52 bits after the point instead of 32 as before. That OTOH requires calling g_rand_int() twice. Overhauled g_rand_int_range(), which is easier now thanks to the new precision of g_rand_double(). Thanks to Sverre Johansen <sj@ifi.uio.no> for the hint. * grand.h: Added g_rand_boolean() and g_random_boolean() macros. While they could be omitted due to extreme simplicity, they make intention clearer in code and are therefore good to have. * grand.c, grand.h: Renamed all 'min' and 'max' parameters to' begin' and 'end' resp. to avoid making people think, that 'max' is included in the interval. 'end' now isn't, whereas 'begin' is. That's similar to the use in the STL. * glib/glib-sections.txt: Added g_rand_boolean and g_random_boolean macros. * glib/tmpl/random_numbers.sgml: Updated.
Diffstat (limited to 'gmodule')
0 files changed, 0 insertions, 0 deletions