This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float fract(float x) { return x - (int) x; } | |
float mix(float a, float b, float t) { return a + (b - a) * t; } | |
float step(float e, float x) { return x < e ? 0.0f : 1.0f; } | |
float constrain(float x, float low, float high) { return ((x) < (low) ? (low) : ((x) > (high) ? (high) : (x))); } | |
float min(float a, float b) { return (a > b) ? b : a; } |