Add fast math optimization

This commit is contained in:
Jeff Hutchinson 2021-05-01 02:07:54 -04:00
parent 55b0ecb487
commit ab4c0f0361
3 changed files with 216 additions and 41 deletions

View file

@ -365,6 +365,28 @@ public:
return type >= ConsoleValueType::cvConsoleValueType;
}
TORQUE_FORCEINLINE void setFastFloat(F64 flt)
{
type = ConsoleValueType::cvFloat;
f = flt;
}
TORQUE_FORCEINLINE F64 getFastFloat() const
{
return f;
}
TORQUE_FORCEINLINE void setFastInt(S64 flt)
{
type = ConsoleValueType::cvInteger;
i = flt;
}
TORQUE_FORCEINLINE S64 getFastInt() const
{
return i;
}
static void init();
};