-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective - Sometimes, like when using shaders, you can only use a time value in `f32`. Unfortunately this suffers from floating precision issues pretty quickly. The standard approach to this problem is to wrap the time after a given period - This is necessary for #5409 ## Solution - Add a `seconds_since_last_wrapping_period` method on `Time` that returns a `f32` that is the `seconds_since_startup` modulo the `max_wrapping_period` --- ## Changelog Added `seconds_since_last_wrapping_period` to `Time` ## Additional info I'm very opened to hearing better names. I don't really like the current naming, I just went with something descriptive. Co-authored-by: Charles <IceSentry@users.noreply.github.com>
- Loading branch information
Showing
1 changed file
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters