diff --git a/AtlasTest/TestTools/TestTools/random.h b/AtlasTest/TestTools/TestTools/random.h
index 080c3a9927cf048f5aee30b0a13493db5be28de7..e2bb0e0c1cec54011d53230eb1a3cb240dbed35a 100644
--- a/AtlasTest/TestTools/TestTools/random.h
+++ b/AtlasTest/TestTools/TestTools/random.h
@@ -1,6 +1,6 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 /*
- * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
  */
 /**
  * @file TestTools/random.h
@@ -52,7 +52,7 @@ uint32_t rng_seed (uint32_t& seed)
 inline
 float randf_seed (uint32_t& seed, float rmax, float rmin = 0)
 {
-  return static_cast<float>(rng_seed(seed)) / rngmax * (rmax-rmin) + rmin;
+  return static_cast<float>(rng_seed(seed)) / static_cast<float>(rngmax) * (rmax-rmin) + rmin;
 }