You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should SpeedInteger actually be floating-point? #479
We have these new SpeedInteger classes. But... as it turns out, it might make more sense to have them be SpeedFloats (or, more likely, a better name like SpeedMeasure or simply Speed). My thinking is: given that we're converting from whatever input units are provided to native units (eventually), we should minimize intermediate truncations to enable the granularity that ticks-per-second provides. This should just be a matter of changing the name, inheritance and documentation mentions.
@dwalton76 What were the motivations for implementing the SpeedInteger family so they were directly inherited from int rather than being their own class with a single field? I'm motivated to switch it to the latter for two reasons:
The inheritance from a system type makes things like stringification weird
It seems that Micropython doesn't support the pattern
Activity
dwalton76 commentedon Aug 6, 2018
Makes sense to me
WasabiFan commentedon Aug 19, 2018
@dwalton76 What were the motivations for implementing the
SpeedIntegerfamily so they were directly inherited fromintrather than being their own class with a single field? I'm motivated to switch it to the latter for two reasons:dwalton76 commentedon Aug 19, 2018
I think it was just “well we are adding to the behavior from int so let’s inherit from that”. I don’t have any objections to changing it.