void av_lfg_init(AVLFG *c, unsigned int seed);
/**
- * Gets the next random unsigned 32-bit number using an ALFG.
+ * Get the next random unsigned 32-bit number using an ALFG.
*
* Please also consider a simple LCG like state= state*1664525+1013904223,
* it may be good enough and faster for your specific use case.
}
/**
- * Gets the next random unsigned 32-bit number using a MLFG.
+ * Get the next random unsigned 32-bit number using a MLFG.
*
* Please also consider av_lfg_get() above, it is faster.
*/
return c->state[c->index++ & 63] = 2*a*b+a+b;
}
+/**
+ * Get the next two numbers generated by a Box-Muller Gaussian
+ * generator using the random numbers issued by lfg.
+ *
+ * @param out[2] array where the two generated numbers are placed
+ */
+void av_bmg_get(AVLFG *lfg, double out[2]);
+
#endif /* AVUTIL_LFG_H */