glsl-constants

GAMMA

const float GAMMA = 2.2;

HALF_PI

// Math.PI / 2
const float HALF_PI = 1.57079632680;

PHI

// Golden ratio: (1 + Math.sqrt(5)) / 2
const float PHI = 1.61803398875;

PI

const float PI = 3.14159265359;

QUARTER_PI

// Math.PI / 4
const float QUARTER_PI = 0.78539816339;

RECIPROCAL_GAMMA

const float RECIPROCAL_GAMMA = 0.45454545455;

RECIPROCAL_PI

// 1 / Math.PI
const float RECIPROCAL_PI = 0.31830988618;

RECIPROCAL_TAU

// 1 / (Math.PI * 2)
const float RECIPROCAL_TAU = 0.15915494309;

TAU

// Math.PI * 2
const float TAU = 6.28318530718;

TO_DEGREES

// 180 / Math.PI
const float TO_DEGREES = 57.29577951308;

TO_RADIANS

// Math.PI / 180;
const float TO_RADIANS = 0.01745329252;