| 648 | |
| 649 | template<class PIX, int maxValue> |
| 650 | static PIX |
| 651 | floatToSample(float value) |
| 652 | { |
| 653 | if (maxValue == 1) { |
| 654 | return PIX(value); |
| 655 | } |
| 656 | if (value <= 0) { |
| 657 | return 0; |
| 658 | } else if (value >= 1.) { |
| 659 | return maxValue; |
| 660 | } |
| 661 | |
| 662 | return PIX(value * maxValue + 0.5f); |
| 663 | } |
| 664 | |
| 665 | template<class PIX, int maxValue> |
| 666 | static PIX |
nothing calls this directly
no outgoing calls
no test coverage detected