Open rparrett opened 3 days ago
0.14 / main
Noticed some small inconsistencies between Time, Timer and Stopwatch while refactoring.
Time
Timer
Stopwatch
This may not be totally comprehensive.
At a glance, it seems like we should
_f64
*_seconds
*_secs
paused
is_paused
When deciding on renames there may be other methods to look at (animation, audio, whatever) with similarly-named methods. e.g. AudioSink::is_paused, Duration::from_secs.
AudioSink::is_paused
Duration::from_secs
Rename *_seconds to *_secs or vice versa
I think we should follow the rust standard library and go with *_secs
Rename paused to is_paused or vice versa
The std shows a clear preference for is_*
std
is_*
Bevy version
0.14 / main
What you did
Noticed some small inconsistencies between
Time
,Timer
andStopwatch
while refactoring.What went wrong
This may not be totally comprehensive.
Time
Timer
Stopwatch
At a glance, it seems like we should
_f64
stuff toTimer
*_seconds
to*_secs
or vice versapaused
tois_paused
or vice versaAdditional information
When deciding on renames there may be other methods to look at (animation, audio, whatever) with similarly-named methods. e.g.
AudioSink::is_paused
,Duration::from_secs
.