Skip to content

Instantly share code, notes, and snippets.

View triangle_sample.cpp
/* Quasi random point sequence
* based on: */
void r2(float *x, float *y, uint32_t i, float jitter)
assert(i > 0);
assert(jitter >= 0.0f);
float phi = 1.324717957244746f;
float sqrtpi = 1.7724538509055159f;
float a0 = 1.0f / phi;
sergof / expression.c
Last active Jun 23, 2018
Simple expression evaluator, generates machine code for x64 and uses virtual machine otherwise.
View expression.c
* Copyright (c) 2017-2018 Sergej Reich
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
sergof / game_changer.c
Last active Feb 13, 2019
A way of embedding build instructions inside a C file in a bash environment, so they can act as "scripts"
View game_changer.c
#if 0
cc ${0} -o _script_
./_script_ "${@}"
rm _script_
exit $ret