[Keymap] Lily58 : HELL0 NAVI. Interface (#15469)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
8a6da095d2
commit
b3c0548ed3
21 changed files with 2879 additions and 0 deletions
17
keyboards/lily58/keymaps/druotoni/fast_random.c
Normal file
17
keyboards/lily58/keymaps/druotoni/fast_random.c
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2021 Nicolas Druoton (druotoni)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "fast_random.h"
|
||||
|
||||
// seed for random
|
||||
static unsigned long g_seed = 0;
|
||||
|
||||
int fastrand(void) {
|
||||
// todo : try with random16();
|
||||
g_seed = (214013 * g_seed + 2531011);
|
||||
return (g_seed >> 16) & 0x7FFF;
|
||||
}
|
||||
|
||||
unsigned long fastrand_long(void) {
|
||||
g_seed = (214013 * g_seed + 2531011);
|
||||
return g_seed;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue