We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b39146d commit bf067f7Copy full SHA for bf067f7
cores/esp8266/WMath.cpp
@@ -26,18 +26,19 @@
26
extern "C" {
27
#include <stdlib.h>
28
}
29
+#include "esp8266_peri.h"
30
31
void randomSeed(unsigned long seed) {
32
if(seed != 0) {
- srand(seed);
33
+ srand((seed ^ RANDOM_REG32));
34
35
36
37
long random(long howbig) {
38
if(howbig == 0) {
39
return 0;
40
- return rand() % howbig;
41
+ return (rand() ^ RANDOM_REG32) % howbig;
42
43
44
long random(long howsmall, long howbig) {
0 commit comments