Hi,
I have a wrong result using FCString::Atof . Using C++ way is ok.
Take this code :
//TEST
FString Fstr = TEXT("12345.0123456789");
double test_double;
test_double = FCString::Atof(*Fstr);
UE_LOG(LogTemp, Warning, TEXT("test_double : %.10f"), test_double);
std::string test2_str = std::string(TCHAR_TO_UTF8(*Fstr));
double test2_double;
sscanf(test2_str.c_str(), "%lf", &test2_double);
UE_LOG(LogTemp, Warning, TEXT("test2_double : %.10f"), test2_double);
Here his result :
[2024.05.01-08.33.03:261][116]LogTemp: Warning: test_double : 12345.0126953125
[2024.05.01-08.33.05:875][116]LogTemp: Warning: test2_double : 12345.0123456789
Why using FCString::Atof return wrong result ? How to use it and have correct result ? Iām using UE5.4.0