mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
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:
parent
055ca0ae00
commit
a91ddfffa1
2 changed files with 2 additions and 2 deletions
|
|
@ -419,7 +419,7 @@ ConsoleGetType(TypeF64)
|
||||||
{
|
{
|
||||||
static const U32 bufSize = 256;
|
static const U32 bufSize = 256;
|
||||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||||
dSprintf(returnBuffer, bufSize, "%Lg", *((F64*)dptr));
|
dSprintf(returnBuffer, bufSize, "%g", *((F64*)dptr));
|
||||||
return returnBuffer;
|
return returnBuffer;
|
||||||
}
|
}
|
||||||
ConsoleSetType(TypeF64)
|
ConsoleSetType(TypeF64)
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ public:
|
||||||
static inline String ToString( U32 v ) { return ToString( "%u", v ); }
|
static inline String ToString( U32 v ) { return ToString( "%u", v ); }
|
||||||
static inline String ToString( S32 v ) { return ToString( "%d", 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( 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(); }
|
inline operator const char* () { return c_str(); }
|
||||||
static String SpanToString(const char* start, const char* end);
|
static String SpanToString(const char* start, const char* end);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue