You've already forked M5Tab5-UserDemo
mirror of
https://github.com/m5stack/M5Tab5-UserDemo.git
synced 2026-05-20 11:38:10 -07:00
20 lines
344 B
C++
20 lines
344 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2025 M5Stack Technology CO LTD
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
#pragma once
|
|
#include <random>
|
|
|
|
namespace math {
|
|
|
|
inline float random(float min, float max)
|
|
{
|
|
std::random_device rd;
|
|
std::mt19937 gen(rd());
|
|
std::uniform_real_distribution dis(min, max);
|
|
return dis(gen);
|
|
}
|
|
|
|
} // namespace math
|