summaryrefslogtreecommitdiffstats
path: root/src/gui/NodeMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/NodeMenu.cpp')
-rw-r--r--src/gui/NodeMenu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index c184384e..f6c8a4b1 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -151,7 +151,7 @@ NodeMenu::on_menu_randomize()
if ((*i)->is_input() && _app->can_control(i->get())) {
float min = 0.0f, max = 1.0f;
nm->port_value_range(*i, min, max, _app->sample_rate());
- const float val = ((rand() / (float)RAND_MAX) * (max - min) + min);
+ const float val = g_random_double_range(0.0, 1.0) * (max - min) + min;
_app->interface()->set_property(
(*i)->path(),
_app->uris().ingen_value,