MyraMath
random.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_UTILITY_RANDOM_H
7 #define MYRAMATH_UTILITY_RANDOM_H
8 
14 #include <myramath/utility/detail/LIBPUBLIC.h>
15 
16 namespace myra {
17 
19 LIBPUBLIC int random_int(int min, int max);
20 
22 LIBPUBLIC int random_int(int max);
23 
25 // Valid instantiations for Number are [float, double, std::complex<float>, std::complex<double>]
26 template<class Number> Number random();
27 
29 template<class Precision> Precision random(Precision min, Precision max);
30 
31 } // namespace
32 
33 #endif
Number random()
Generate random real/complex Numbers, uniformly distributed over [-1,1].
Definition: syntax.dox:1