2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 #include "random_utils.h"
11 float RandomBetween(float min, float max)
13 static bool randInitialized = false;
17 randInitialized = true;
20 const size_t divisor = 10000;
21 return min + ((rand() % divisor) / static_cast<float>(divisor)) * (max - min);