Skip to content

Instantly share code, notes, and snippets.

View sspboyd's full-sized avatar
🎯
Focusing

Stephen Boyd sspboyd

🎯
Focusing
View GitHub Profile
@imbcmdth
imbcmdth / fast_math.js
Last active June 26, 2021 05:54
Fast Approximate Functions for JavaScript based on https://code.google.com/p/fastapprox/
var Approx = {
fastlog2: (function () {
var a = new ArrayBuffer(4),
i = new Int32Array(a),
f = new Float32Array(a);
return function fasterLog2 (number) {
f[0] = number;
var t = i[0] * 1.1920928955078125e-7;
return t - 126.94269504;
@sspboyd
sspboyd / processing.org-new-project-template.java
Last active August 9, 2022 18:10
Processing.org-New Project Template
import processing.pdf.*;
////Declare Globals
int rSn; // randomSeed number. put into var so can be saved in file name. defaults to 47
final float PHI = 0.618033989;
boolean recording = false; // used for MovieMaker output
boolean PDFOUT = false;
//// Declare Font Variables
@sindresorhus
sindresorhus / countrycode-latlong-array.json
Created November 5, 2011 16:03
Country codes (ISO 3166) to latitude longitude - converted from http://www.maxmind.com/app/country_latlon
{
"ad": [
"42.5000",
"1.5000"
],
"ae": [
"24.0000",
"54.0000"
],
"af": [