Now using libscnumerics for random numbers

This commit is contained in:
Bob Polis 2021-10-06 11:25:41 +02:00
parent a45a8aa8df
commit 3937dc1c37

View File

@ -8,6 +8,7 @@
#include "FadingRects.hpp" #include "FadingRects.hpp"
#include <libscscreensaver.hpp> #include <libscscreensaver.hpp>
#include <libscnumerics.hpp>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
@ -153,7 +154,6 @@ Color FadingRects::next_color() {
void FadingRects::setup(cairo_t* context, const cairo_rectangle_t& rect) { void FadingRects::setup(cairo_t* context, const cairo_rectangle_t& rect) {
ScreensaverPlugin::setup(context, rect); ScreensaverPlugin::setup(context, rect);
std::uniform_real_distribution<double> dist {0.0, 360.0}; _hue = sc::random::double_between(0.0, 360.0);
_hue = dist(_eng);
_rects.clear(); _rects.clear();
} }