This repository was archived by the owner on Feb 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 3
3
#include "actrtime.h"
4
4
5
5
// this is probably a "bad" idea, some guy on SO said making my own prng was bad so I did it
6
- //
7
- extern void prngd (double d );
8
6
9
- float actr_prng_max = 4294967295 ;
10
- //unsigned int actr_prng_prime = 2147483647;
7
+ float actr_prng_max = 4294967296 ;
11
8
unsigned int actr_prng_prime = 2147483629 ;
12
-
13
- //unsigned int actr_prng_prime = 479001599;
14
-
15
- //unsigned int actr_prng_prime = 13;
16
9
unsigned int actr_prng_seed = 419420 ;
17
10
18
11
void actr_sprng (unsigned int seed ) {
@@ -23,10 +16,9 @@ unsigned int actr_prng() {
23
16
return actr_prng_seed ;
24
17
}
25
18
26
- float actr_prngd () {
19
+ float actr_prngf () {
27
20
actr_prng_seed *= actr_prng_prime ;
28
21
float result = actr_prng_seed / actr_prng_max ;
29
- prngd (result );
30
22
return result ;
31
23
}
32
24
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ void actr_init()
11
11
{
12
12
actr_sprng (actr_time ());
13
13
tree = actr_quad_tree_init ();
14
- for (int i = 0 ; i < 77 ; i ++ )
14
+ for (int i = 0 ; i < 1000 ; i ++ )
15
15
{
16
- actr_prngd ();
16
+ actr_prngf ();
17
17
}
18
18
}
19
19
[[clang ::export_name ("actr_tap" )]]
You can’t perform that action at this time.
0 commit comments