| 43 | } |
| 44 | |
| 45 | float smoothStep(float edge0, float edge1, float x) |
| 46 | { |
| 47 | if (edge1 <= edge0) |
| 48 | return x >= edge1 ? 1.0f : 0.0f; |
| 49 | const float t = clamp01((x - edge0) / (edge1 - edge0)); |
| 50 | return t * t * (3.0f - 2.0f * t); |
| 51 | } |
| 52 | |
| 53 | float finiteOr(float value, float fallback) |
| 54 | { |
no test coverage detected