fixed windows build and added new test to vc++ project

This commit is contained in:
Mark Vejvoda 2013-06-10 23:08:03 +00:00
parent 16f4e08395
commit d067b52799
3 changed files with 3 additions and 1 deletions

View File

@ -98,6 +98,7 @@
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\source\tests\shared_lib\graphics\math_util_test.cpp" />
<ClCompile Include="..\..\source\tests\shared_lib\xml\xml_parser_test.cpp" /> <ClCompile Include="..\..\source\tests\shared_lib\xml\xml_parser_test.cpp" />
<ClCompile Include="..\..\source\tests\test_runner.cpp" /> <ClCompile Include="..\..\source\tests\test_runner.cpp" />
</ItemGroup> </ItemGroup>

View File

@ -101,6 +101,7 @@
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\source\tests\shared_lib\graphics\math_util_test.cpp" />
<ClCompile Include="..\..\..\source\tests\shared_lib\xml\xml_parser_test.cpp" /> <ClCompile Include="..\..\..\source\tests\shared_lib\xml\xml_parser_test.cpp" />
<ClCompile Include="..\..\..\source\tests\test_runner.cpp" /> <ClCompile Include="..\..\..\source\tests\test_runner.cpp" />
</ItemGroup> </ItemGroup>

View File

@ -330,7 +330,7 @@ inline T truncateDecimal(const T &value, int precision=6) {
return result; return result;
*/ */
T precNum = pow(10, precision); T precNum = std::pow((T)10, (T)precision);
T result = xs_CRoundToInt(value * precNum); T result = xs_CRoundToInt(value * precNum);
result /= precNum; result /= precNum;
return result; return result;