summaryrefslogtreecommitdiff
path: root/include/JSystem/JMath
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2026-10-27 00:29:52 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2026-10-27 00:29:52 -0400
commit81ebe0dfd449166e00de31ce9be2d7449e31536c (patch)
tree0f7b648f69950c3d5edd916041ac52697c94ca4d /include/JSystem/JMath
parent02de6b772d06b2ed15bbe7b25d01901fdca84966 (diff)
Work on JAS inlines, fix limits/climits headers
Diffstat (limited to 'include/JSystem/JMath')
-rw-r--r--include/JSystem/JMath/random.h9
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