UNPKG

lygia

Version:

lygia, it's a granular and multi-language shader library designed for performance and flexibility

24 lines (23 loc) 1.03 kB
/* contributors: Patricio Gonzalez Vivo description: some useful math constants license: - Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0 - Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license */ const EIGHTH_PI: f32 = 0.39269908169; const QTR_PI: f32 = 0.78539816339; const HALF_PI: f32 = 1.5707963267948966192313216916398; const PI: f32 = 3.1415926535897932384626433832795; const TWO_PI: f32 = 6.2831853071795864769252867665590; const TAU: f32 = 6.2831853071795864769252867665590; const INV_PI: f32 = 0.31830988618379067153776752674503; const INV_SQRT_TAU = 0.39894228040143267793994605993439; const SQRT_HALF_PI: f32 = 1.25331413732; const PHI: f32 = 1.618033988749894848204586834; const EPSILON: f32 = 0.0000001; const GOLDEN_RATIO: f32 = 1.6180339887; const GOLDEN_RATIO_CONJUGATE: f32 = 0.61803398875; const GOLDEN_ANGLE: f32 = 2.39996323; // const DEG2RAD: f32 = PI / 180.0; // const RAD2DEG: f32 = 180.0 / PI;