fixes for linux

According to doc and man pages we should not be using %Lg for a double as %Lg relates to a long double, F64 in torque is just a double so. This also produces better results when going from colorF to the colorPicker dialogue
This commit is contained in:
marauder2k7 2025-01-24 08:44:57 +00:00
parent 055ca0ae00
commit a91ddfffa1
2 changed files with 2 additions and 2 deletions

View file

@ -419,7 +419,7 @@ ConsoleGetType(TypeF64)
{
static const U32 bufSize = 256;
char* returnBuffer = Con::getReturnBuffer(bufSize);
dSprintf(returnBuffer, bufSize, "%Lg", *((F64*)dptr));
dSprintf(returnBuffer, bufSize, "%g", *((F64*)dptr));
return returnBuffer;
}
ConsoleSetType(TypeF64)

View file

@ -186,7 +186,7 @@ public:
static inline String ToString( U32 v ) { return ToString( "%u", v ); }
static inline String ToString( S32 v ) { return ToString( "%d", v ); }
static inline String ToString( F32 v ) { return ToString( "%g", v ); }
static inline String ToString( F64 v ) { return ToString( "%Lg", v ); }
static inline String ToString( F64 v ) { return ToString( "%g", v ); }
inline operator const char* () { return c_str(); }
static String SpanToString(const char* start, const char* end);