Skip to content

Commit

Permalink
Add copyright notice for the XORShift algo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakKemble committed Sep 2, 2018
1 parent 3ad20da commit 07a2e47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firmware/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ static uint8_t rollDelays[] = {

// https://www.avrfreaks.net/forum/random-number-generation-0
// https://en.wikipedia.org/wiki/Xorshift
// https://github.com/edrosten/8bit_rng/blob/master/rng-4261412736.c
// https://en.wikipedia.org/wiki/Linear_congruential_generator
//uint8_t val = rand() / (RAND_MAX / 6 + 1);
static uint8_t genRandom(void)
{
// Source: https://github.com/edrosten/8bit_rng/blob/master/rng-4261412736.c
// Copyright Edward Rosten 2008--2013.

static uint8_t x;
static uint8_t y;
static uint8_t z;
Expand Down

0 comments on commit 07a2e47

Please sign in to comment.