MyraMath
random


Source: tests/utility/random.cpp

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 
13 
14 #include <tests/myratest.h>
15 
16 using namespace myra;
17 
18 ADD_TEST("random","[utility]")
19  {
20  myra::out() << random_int(25) << std::endl;
21  myra::out() << random<float >() << std::endl;
22  myra::out() << random<double>() << std::endl;
23  myra::out() << random<std::complex<float > >() << std::endl;
24  myra::out() << random<std::complex<double> >() << std::endl;
25  };
Definition: syntax.dox:1
Various utility functions/classes related to scalar Number types.
Simplistic random number functions.


Results: [PASS]

5
0.672669
-0.916273
(0.92322,0.766182)
(0.0566667,-0.625732)


Go back to Summary of /test programs.