Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Similarly, Unreal Engine 4 offsets platform time (a double) by some large value so if it's stored in a float, accuracy errors will be exposed almost immediately. Looking it up, the offset starts out large enough that the epsilon is two seconds.


Do you have a link with more info? I'd love to read more about this.


Sorry, no. It's not something documented other than a cryptic comment in the source code ( FPlatformTime::Seconds() ) assuming some knowledge of floating point number gotchas.

Edit: Here's a more detailed post o made about the specific gotcha if you're interested: https://community.gamedev.tv/t/why-is-fplatformtime-seconds-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: