use esp_random in WMath.cpp
This commit is contained in:
parent
6db0ee1304
commit
49f35ff070
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "esp_system.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
void randomSeed(unsigned long seed)
|
void randomSeed(unsigned long seed)
|
||||||
@ -39,7 +40,7 @@ long random(long howbig)
|
|||||||
if(howbig == 0) {
|
if(howbig == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return rand() % howbig;
|
return esp_random() % howbig;
|
||||||
}
|
}
|
||||||
|
|
||||||
long random(long howsmall, long howbig)
|
long random(long howsmall, long howbig)
|
||||||
|
Loading…
Reference in New Issue
Block a user