diff options
Diffstat (limited to 'include/JSystem/JMath')
| -rw-r--r-- | include/JSystem/JMath/random.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/JSystem/JMath/random.h b/include/JSystem/JMath/random.h index 2d4382e6..c5d42ea3 100644 --- a/include/JSystem/JMath/random.h +++ b/include/JSystem/JMath/random.h @@ -2,6 +2,7 @@ #define RANDOM_H #include "dolphin/types.h" +#include <limits> namespace JMath { struct TRandom_fast_ { @@ -56,6 +57,14 @@ public: u32 get_uint32(u32 param_0) { return this->get_ufloat_1() * param_0; } + + f32 get_ufloat(f32 param_0) { + return this->get_ufloat_1() * param_0; + } + + f32 get_float(f32 param_0) { + return this->get_ufloat(param_0) - ((param_0 / 2.0f) - std::numeric_limits<f32>::epsilon()); + } }; } // namespace JMath |
