File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
platform/android/jni/common Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
// This file is part of SmallBASIC
2
2
//
3
- // lowlevel device (OS) I/O
3
+ // random number generator, see:
4
+ // https://en.wikipedia.org/wiki/Permuted_congruential_generator
5
+ // https://www.pcg-random.org/download.html
4
6
//
5
7
// This program is distributed under the terms of the GPL v2.0 or later
6
8
// Download the GNU Public License (GPL) from www.gnu.org
7
9
//
8
- // Copyright(C) 2000 Nicholas Christopoulos
10
+ // Copyright(C) 2021 Chris Warren-Smith
9
11
10
12
#include "config.h"
11
13
12
14
#include "common/sys.h"
13
15
#include <stdint.h>
14
16
#include <limits.h>
15
17
16
- // see:
17
- // https://en.wikipedia.org/wiki/Permuted_congruential_generator
18
- // https://www.pcg-random.org/download.html
19
-
20
18
static uint64_t state = 0x4d595df4d0f33173 ;
21
19
static uint64_t multiplier = 6364136223846793005u ;
22
20
static uint64_t increment = 1442695040888963407u ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ LOCAL_SRC_FILES := \
31
31
$(COMMON ) /device.c \
32
32
$(COMMON ) /screen.c \
33
33
$(COMMON ) /system.c \
34
+ $(COMMON ) /random.c \
34
35
$(COMMON ) /eval.c \
35
36
$(COMMON ) /extlib.c \
36
37
$(COMMON ) /file.c \
You can’t perform that action at this time.
0 commit comments