MLV_random.h(3)
✨ MLV_random.h(3) ✨
okay bestie, welcome to the MLV_random.h manual page — it's part of the Library Functions Manual and it's literally all about getting random in C. 🎲💖
🌸 NAME 🌸
MLV_random.h — so this file defines all the prototypes of the functions that deal with manipulating random numbers. that's it, that's the whole vibe. (Ce fichier définit tous les prototypes des fonctions concernant la manipulation des nombres aléatoires.)
✨ SYNOPSIS ✨
🎀 Fonctions
void MLV_set_seed (int32_t seed)— initializes the seed of the internal number generator. 🌱int MLV_get_random_boolean ()— returns0or1, randomly. 🪙int MLV_get_random_integer (int begin, int end)— returns a random integer picked from the interval you hand it as a parameter. 🔢double MLV_get_random_double (double begin, double end)— returns a random real number picked from the interval you hand it as a parameter. 💫
💜 Description détaillée 💜
This file defines all the prototypes of the functions concerning the manipulation of random numbers. no notes, iconic behaviour, periodt.
👑 Auteur
- Adrien Boussicault
- Marc Zipstein
🦋 Documentation des fonctions 🦋
🌈 int MLV_get_random_boolean ()
Returns 0 or 1, randomly. that's the whole function. it's giving coin flip, but make it C. 🪙
Renvoie
0 or 1, randomly.
Exemples
beginner/03_random.c.
🌸 double MLV_get_random_double (double begin, double end)
Returns a random real number chosen from the interval given as a parameter. 💫
Paramètres
begin— lower bound of the interval (inclusive).end— upper bound of the interval (inclusive).
Renvoie
A random real number chosen from the interval [begin, end].
Exemples
beginner/03_random.c.
⭐ int MLV_get_random_integer (int begin, int end)
Returns a random integer chosen from the interval given as a parameter. 🔢
Paramètres
begin— lower bound of the interval (inclusive).end— upper bound of the interval (inclusive).
Renvoie
A random integer chosen from the interval [begin, end].
Exemples
beginner/03_random.c.
🎀 void MLV_set_seed (int32_t seed)
Initializes the seed of the internal number generator. By default, the seed of the number generator is automatically initialized to different values on each execution of the program. ✨
Use this function if you want the random number generator to use a particular seed — like, for making reproducible tests from one execution to the next. If you don't want that, bestie, you genuinely don't need to use this function at all. 🫶
ngl, this is the one to remember if your "random" test keeps failing only sometimes. that's not the universe hating you, that's an unseeded generator. 💀
Paramètres
seed— the seed (32-bit integer).
💅 Auteur 💅
Automatically generated by Doxygen for MLV-3.1.0 from the source code. ✨
and that's the page!! this whole thing came from MLV-3.1.0, dated Samedi 29 Janvier 2022, and it's giving MLV_random.h(3) energy from start to finish. go forth and generate numbers, bestie, you got this. 👑💖🦋
📦 where this page comes from
- ubuntu jammy: libmlv3-dev 3.1.0-7 · GPL-3.0-only
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms