| 669 | // space! hence the special case here |
| 670 | volatile float gFloatHome; |
| 671 | float RepeatNormalizedAddressFn(float fValue, size_t maxValue) |
| 672 | { |
| 673 | #ifndef _MSC_VER // Use original if not the VS compiler. |
| 674 | // General computation for repeat |
| 675 | return (fValue - floorf(fValue)) * (float)maxValue; // Reduce to [0, 1.f] |
| 676 | #else // Otherwise, use this instead: |
| 677 | // Home the subtraction to a float to break up the sequence of x87 |
| 678 | // instructions emitted by the VS compiler. |
| 679 | gFloatHome = fValue - floorf(fValue); |
| 680 | return gFloatHome * (float)maxValue; |
| 681 | #endif |
| 682 | } |
| 683 | |
| 684 | float MirroredRepeatNormalizedAddressFn(float fValue, size_t maxValue) |
| 685 | { |
no outgoing calls
no test coverage detected