Fix build when ASSIMP_DOUBLE_PRECISION is on.
Tested: $ cmake -DASSIMP_DOUBLE_PRECISION=1 -DASSIMP_BUILD_MDL_IMPORTER=0 ..; make The MDL importer is disabled due to the fact that there is some float-only code in MDL. This also means bin/assimp and bin/unit would not link successfully with the above build flags.
This commit is contained in:
@@ -214,7 +214,7 @@ BinFloat ToBinary(const ai_real &pValue) {
|
||||
const bool OneComplement = ((-42 == ~42) && (binValue & 0x80000000));
|
||||
|
||||
if (DefaultValue)
|
||||
return BinFloat(1 << (CHAR_BIT * sizeof(BinFloat) - 1)) - binValue;
|
||||
return BinFloat(BinFloat(1) << (CHAR_BIT * sizeof(BinFloat) - 1)) - binValue;
|
||||
// One's complement?
|
||||
else if (OneComplement)
|
||||
return BinFloat(-0) - binValue;
|
||||
|
||||
Reference in New Issue
Block a user