Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 512698b

Browse files
committed
work
1 parent c59b4b0 commit 512698b

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

header/actrprng.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@
33
#include "actrtime.h"
44

55
// 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);
86

9-
float actr_prng_max = 4294967295;
10-
//unsigned int actr_prng_prime = 2147483647;
7+
float actr_prng_max = 4294967296;
118
unsigned int actr_prng_prime = 2147483629;
12-
13-
//unsigned int actr_prng_prime = 479001599;
14-
15-
//unsigned int actr_prng_prime = 13;
169
unsigned int actr_prng_seed = 419420;
1710

1811
void actr_sprng(unsigned int seed) {
@@ -23,10 +16,9 @@ unsigned int actr_prng() {
2316
return actr_prng_seed;
2417
}
2518

26-
float actr_prngd() {
19+
float actr_prngf() {
2720
actr_prng_seed *= actr_prng_prime;
2821
float result = actr_prng_seed / actr_prng_max;
29-
prngd(result);
3022
return result;
3123
}
3224

ui-example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ void actr_init()
1111
{
1212
actr_sprng(actr_time());
1313
tree = actr_quad_tree_init();
14-
for (int i = 0; i < 77; i++)
14+
for (int i = 0; i < 1000; i++)
1515
{
16-
actr_prngd();
16+
actr_prngf();
1717
}
1818
}
1919
[[clang::export_name("actr_tap")]]

0 commit comments

Comments
 (0)