michael@0: // Copyright (c) 2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef BASE_RAND_UTIL_H_ michael@0: #define BASE_RAND_UTIL_H_ michael@0: michael@0: #include "base/basictypes.h" michael@0: michael@0: namespace base { michael@0: michael@0: // Returns a random number in range [0, kuint64max]. Thread-safe. michael@0: uint64_t RandUint64(); michael@0: michael@0: // Returns a random number between min and max (inclusive). Thread-safe. michael@0: int RandInt(int min, int max); michael@0: michael@0: // Returns a random double in range [0, 1). Thread-safe. michael@0: double RandDouble(); michael@0: michael@0: } // namespace base michael@0: michael@0: #endif // BASE_RAND_UTIL_H_