Care for animals.
esv::random is a function object of a class used to generate random values to a range.
esv::random: Random Algorithm
esv::random(begin, end);
esv::random(begin, end, border);
esv::random(begin, end, min, max); // Don't worry if min > max, it will swap it internnally.
esv::random(range);
esv::random(range, border);
esv::random(range, min, max); // Don't worry if min > max, it will swap it internnally.
Random Negative Value Support: YES
esv::random_class::border_type_default : esv::i16
esv::random_class::border_value_default : 1000
#include <esvcpp/random.hpp>
esv::random is an algorithm to random generate values to a range, so it is part of esvcpp/algorithm.hpp.
#include <esvcpp/core.hpp> #include <esvcpp/random.hpp> #include <vector> int main() { std::vector<esv::i32> v1(12); esv::random(v1); esv::print(v1); std::vector<esv::ix32> v2(12); esv::random(v2); esv::print(v2); std::vector<esv::f32> v3(12); esv::random(v3, -100, 50); esv::print(v3); std::vector<esv::fx32> v4(12); esv::random(v4, -100, 50); esv::print(v4); }