| 353 | |
| 354 | template<class PIX, int maxValue> |
| 355 | static PIX |
| 356 | floatToSample(float value) |
| 357 | { |
| 358 | if (maxValue == 1) { |
| 359 | return PIX(value); |
| 360 | } |
| 361 | if (value <= 0) { |
| 362 | return 0; |
| 363 | } else if (value >= 1.) { |
| 364 | return maxValue; |
| 365 | } |
| 366 | |
| 367 | return PIX(value * maxValue + 0.5f); |
| 368 | } |
| 369 | |
| 370 | template<class PIX, int maxValue> |
| 371 | static PIX |
nothing calls this directly
no outgoing calls
no test coverage detected