Helper: clamp float to 0..1
| 455 | |
| 456 | // Helper: clamp float to 0..1 |
| 457 | static float clamp01(float v) { |
| 458 | if (v < 0.0f) return 0.0f; |
| 459 | if (v > 1.0f) return 1.0f; |
| 460 | return v; |
| 461 | } |
| 462 | |
| 463 | // Helper: clamp float to -1..1 |
| 464 | static float clampNeg1To1(float v) { |
no outgoing calls
no test coverage detected