Skip to content

Instantly share code, notes, and snippets.

View SalvatorePreviti's full-sized avatar

Salvatore Previti SalvatorePreviti

View GitHub Profile
@dwilliamson
dwilliamson / MarchingCubes.js
Last active May 7, 2024 09:46
Marching Cubes Lookup Tables
//
// Lookup Tables for Marching Cubes
//
// These tables differ from the original paper (Marching Cubes: A High Resolution 3D Surface Construction Algorithm)
//
// The co-ordinate system has the more convenient properties:
//
// i = cube index [0, 7]
// x = (i & 1) >> 0
// y = (i & 2) >> 1
@memononen
memononen / biasgaininf.c
Last active February 2, 2022 10:09
bias gain inflection point
float evalCurve(float x, float tx, float ty, float sa, float sb)
{
const float EPS = 1e-6f;
if (x < tx) {
return (ty * x) / (x + sa * (tx - x) + EPS);
} else {
return ((1-ty) * (x-1)) / ((1-x) - sb * (tx - x) + EPS) + 1.0f;
}
}
@bkaradzic
bkaradzic / orthodoxc++.md
Last active June 29, 2024 09:06
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@mhart
mhart / awslambda
Last active April 14, 2019 15:38
node_modules/awslambda
#!/usr/bin/env node
var path = require('path')
var fs = require('fs')
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/awslambda.js').start_runtime();