MCPcopy Create free account
hub / github.com/dartsim/dart / Random

Function Random

python/dartpy/math/Random.cpp:45–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43namespace python {
44
45void Random(py::module& m)
46{
47 ::py::class_<dart::math::Random>(m, "Random")
48 .def(::py::init<>())
49 .def_static(
50 "setSeed",
51 +[](unsigned int seed) { dart::math::Random::setSeed(seed); },
52 ::py::arg("seed"))
53 .def_static(
54 "getSeed",
55 +[]() -> unsigned int { return dart::math::Random::getSeed(); })
56 .def_static(
57 "uniform",
58 +[](double min, double max) -> double {
59 return dart::math::Random::uniform(min, max);
60 },
61 ::py::arg("min"),
62 ::py::arg("max"));
63}
64
65} // namespace python
66} // namespace dart

Callers 3

test_createFunction · 0.90
test_seedFunction · 0.90
dart_mathFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_createFunction · 0.72
test_seedFunction · 0.72