If a SetInterpolator() is used, then clamp the results.
This fixes a numerical overflow issue. The code skips the clamping step for linear and NN interpolation for better performance, but for high-order interpolation, it needs to clamp the result to the range of the output scalar type. A bug caused it to incorrectly skip the clamping if a high order interpolator was set with SetInterpolator(), but only for the "PermuteExecute" code path that is used for rotations that are precise multiples of 90 degrees.
Showing with 9 additions and 1 deletion