Remove cast warnings in UnitTestMatrix.
Unlike most compilers, MSVC will give conversion warnings when implicitly converting a 32-bit int to a 32-bit float because the mantissa can potentially drop some of the lower order bits of large ints. Use static casts to (hopefully) remove the warnings.