27#ifndef mx_math_randomSeed_hpp
28#define mx_math_randomSeed_hpp
52template <
typename intT>
60 fd = open(
"/dev/urandom", O_RDONLY );
72 int rv = ::read( fd, &seedval,
sizeof( intT ) );
83 int sz =
sizeof( intT );
static constexpr error_t errno2error_t(const int &err)
Convert an errno code to error_t.
@ filererr
An error occurred while reading from a file.
error_t mxlib_error_report(const error_t &code, const std::string &expl, const std::source_location &loc=std::source_location::current())
Print a report to stderr given an mxlib error_t code and explanation and return the code.
int randomSeed(intT &seedval)
Get a value to use as a random seed.
Declarations of some libarary wide utilities.