Log long double value
I am currently working with large numbers such as __int64 and long doubles and im fairly new to unreal myself. I have been spending hours trying to figure out how i can print long doubles as i need to check that all my calculations are correct but this is becoming an issue as from what i can tell UE_LOG does not support Long Doubles only floats.
In standard c++ this won't be an issue as i can just use printf like
and that works fine but when i use %lg in UE_LOG like this
It won't compile.
Is there a way i can log long doubles within unreal or atleast see the output from printf?
asked Oct 21 '16 at 12:04 AM in C++ Programming
You could convert the long to a std::string, convert that to FString, and then send that to the log:
That gave me: "test = 9.36129e-15" in my log.
I don't know if there's a more direct route, but it works.
answered Oct 21 '16 at 03:22 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here