From 4685228fd88af959f5bb040574c46351fc08e102 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 30 Jun 2020 16:35:18 +0200
Subject: [PATCH] TestTools: Fix clang 10 warning.

Use explict cast for int->float conversion that loses precision.
---
 AtlasTest/TestTools/TestTools/random.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/AtlasTest/TestTools/TestTools/random.h b/AtlasTest/TestTools/TestTools/random.h
index 080c3a9927c..e2bb0e0c1ce 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;
 }
 
 
-- 
GitLab