srng: impl floating point numbers and make std dist compat

This commit is contained in:
2021-06-21 23:07:48 +02:00
parent 573b276116
commit c9db08cb0a
3 changed files with 34 additions and 1 deletions

View File

@ -9,6 +9,11 @@ struct ScalarRange2 {
ScalarRange2(void) = default;
ScalarRange2(const T& both) noexcept {
v_min = both;
v_max = both;
}
ScalarRange2(const T& min, const T& max) noexcept {
if (min <= max) {
v_min = min;