Add rand.h for non-qrand.c rand functions (#1684)

* sync rand.h with related oot PR

* fix

* yeet comment
This commit is contained in:
Dragorn421 2024-09-19 04:49:56 +02:00 committed by GitHub
parent e05eaf9812
commit 34dcfbccc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 2 deletions

9
include/rand.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef RAND_H
#define RAND_H
#include "libc64/qrand.h"
f32 Rand_ZeroFloat(f32 scale);
f32 Rand_CenteredFloat(f32 scale);
#endif

View File

@ -22,6 +22,7 @@
#include "message_data_static.h"
#include "padmgr.h"
#include "padutils.h"
#include "rand.h"
#include "regs.h"
#include "scheduler.h"
#include "segmented_address.h"

View File

@ -244,8 +244,6 @@ f32 Math_Factorial(s32 n);
f32 Math_PowF(f32 base, s32 exp);
f32 Math_SinF(f32 rad);
f32 Math_CosF(f32 rad);
f32 Rand_ZeroFloat(f32 scale);
f32 Rand_CenteredFloat(f32 scale);
s16 Math_Atan2S(f32 y, f32 x);
f32 Math_Atan2F(f32 y, f32 x);

View File

@ -4,6 +4,7 @@
*/
#include "global.h"
#include "rand.h"
static f32 sFactorialTbl[] = {
1.0f, 1.0f, 2.0f, 6.0f, 24.0f, 120.0f, 720.0f, 5040.0f, 40320.0f, 362880.0f, 3628800.0f, 39916800.0f, 479001600.0f,

View File

@ -3,6 +3,7 @@
#include "libc64/qrand.h"
#include "rand.h"
#include "segmented_address.h"
#include "sfx.h"
#include "z64game.h"