Skip to content

Instantly share code, notes, and snippets.

View bit-hack's full-sized avatar

Aidan Dodds bit-hack

View GitHub Profile
@bit-hack
bit-hack / random.h
Last active August 31, 2016 22:02
random.h is a header only random number generation library.
/* Random Number Generation Library
* Aidan Dodds 2016
*
* This library contains a bunch of random number routines with integer and
* float output and a handful of different weightings. These routines were
* written for use in the context of game development and image processing.
* These routines are in no way suitable for cryptographic purposes, or where
* statistical accuracy is required. Im a programmer, not a mathematician.
*
* I place this library in the public domain.
@bit-hack
bit-hack / binheap.h
Last active February 16, 2016 08:35
Simple fixed size binary heap implementation, indented for A* applications.
// Simple fixed size binary heap implementation, intended for A* applications.
// Aidan Dodds 15/2/2016.
// Do whatever you want with this...
#pragma once
#include <stdint.h>
#include <array>
#include <cassert>
// Fixed size binary heap implementation