(float flt)
| 606 | |
| 607 | |
| 608 | static int FloatToS15_16(float flt) { |
| 609 | flt = flt * 65536f + 0.5f; |
| 610 | if (flt <= -(65536f * 65536f)) { |
| 611 | return Integer.MIN_VALUE; |
| 612 | } else if (flt >= (65536f * 65536f)) { |
| 613 | return Integer.MAX_VALUE; |
| 614 | } else { |
| 615 | return (int) Math.floor(flt); |
| 616 | } |
| 617 | } |
| 618 | |
| 619 | |
| 620 | static float S15_16ToFloat(int fix) { |
no test coverage detected