mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 20:41:29 -04:00
Misc Matches using debug (#2388)
This commit is contained in:
@@ -12,7 +12,7 @@ void JMAVECScaleAdd(register const Vec* vec1, register const Vec* vec2, register
|
||||
register f32 scale);
|
||||
|
||||
inline int JMAAbs(int value) {
|
||||
return value > 0 ? value : -value;
|
||||
return __abs(value);
|
||||
}
|
||||
|
||||
inline f32 JMAFastReciprocal(f32 value) {
|
||||
|
||||
@@ -20,10 +20,6 @@ struct TRandom_fast_ {
|
||||
|
||||
u32 get_bit32(void) { return this->get(); }
|
||||
|
||||
u8 get_uint8(u8 param_0) {
|
||||
return get_ufloat_1() * param_0;
|
||||
}
|
||||
|
||||
// due to the float constant, having this function inlined adds that float to data,
|
||||
// making it not match
|
||||
float get_ufloat_1(void) {
|
||||
@@ -39,6 +35,17 @@ struct TRandom_fast_ {
|
||||
|
||||
void setSeed(u32 seed) { value = seed; }
|
||||
};
|
||||
|
||||
template <class RandomT>
|
||||
class TRandom_ : public RandomT {
|
||||
public:
|
||||
TRandom_(u32 value) : RandomT(value) {}
|
||||
|
||||
u8 get_uint8(u8 param_0) {
|
||||
return get_ufloat_1() * param_0;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace JMath
|
||||
|
||||
#endif /* RANDOM_H */
|
||||
|
||||
Reference in New Issue
Block a user