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 11// This file is part of SmallBASIC
22//
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
46//
57// This program is distributed under the terms of the GPL v2.0 or later
68// Download the GNU Public License (GPL) from www.gnu.org
79//
8- // Copyright(C) 2000 Nicholas Christopoulos
10+ // Copyright(C) 2021 Chris Warren-Smith
911
1012#include "config.h"
1113
1214#include "common/sys.h"
1315#include <stdint.h>
1416#include <limits.h>
1517
16- // see:
17- // https://en.wikipedia.org/wiki/Permuted_congruential_generator
18- // https://www.pcg-random.org/download.html
19-
2018static uint64_t state = 0x4d595df4d0f33173 ;
2119static uint64_t multiplier = 6364136223846793005u ;
2220static uint64_t increment = 1442695040888963407u ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ LOCAL_SRC_FILES := \
3131 $(COMMON ) /device.c \
3232 $(COMMON ) /screen.c \
3333 $(COMMON ) /system.c \
34+ $(COMMON ) /random.c \
3435 $(COMMON ) /eval.c \
3536 $(COMMON ) /extlib.c \
3637 $(COMMON ) /file.c \
You can’t perform that action at this time.
0 commit comments