From b6048ed39c9f34a4480f2a99c5d83817d3ccf1bf Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Tue, 9 Jul 2024 18:21:32 -0400 Subject: [PATCH] add default types to random functions --- CMakeLists.txt | 2 +- include/blt/std/random.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07046c9..61ec34c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 0.18.1) +set(BLT_VERSION 0.18.3) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/std/random.h b/include/blt/std/random.h index 02a285b..41ab5a5 100644 --- a/include/blt/std/random.h +++ b/include/blt/std/random.h @@ -62,13 +62,13 @@ namespace blt::random * @param max exclusive max * @return random int between min (inclusive) and max (exclusive) */ - template + template static inline T pcg_random32(blt::u32& seed, T min = 0, T max = 2) { return static_cast((pcg_double32(seed) * static_cast(max - min)) + static_cast(min)); } - template + template static inline T pcg_random32c(blt::u32 seed, T min = 0, T max = 2) { return pcg_int(seed, min, max); @@ -96,13 +96,13 @@ namespace blt::random return murmur_double64(seed); } - template + template static inline T murmur_random64(blt::u64& seed, T min = 0, T max = 2) { return static_cast((murmur_double64(seed) * static_cast(max - min)) + static_cast(min)); } - template + template static inline T murmur_random64c(blt::u64 seed, T min = 0, T max = 2) { return murmur_integral_64(seed, min, max);