Why is the download speed stored as a float, especially when the upstream library returns it as an int? The value is in bytes per second, and it can never be a decimal.
I must say that I'm guessing. I think past me from 5 years ago probably just made some design choice, then moved to integers and forgot to change this to an int.
Why is the download speed stored as a
float
, especially when the upstream library returns it as anint
? The value is in bytes per second, and it can never be a decimal.https://github.com/TorrentStream/TorrentStream-Android/blob/180c1a1ab875fddfa20b98f8b799030510be59ee/library/src/main/java/com/github/se_bastiaan/torrentstream/StreamStatus.java#L23
Even the constructor accepts it as an
int
: https://github.com/TorrentStream/TorrentStream-Android/blob/180c1a1ab875fddfa20b98f8b799030510be59ee/library/src/main/java/com/github/se_bastiaan/torrentstream/StreamStatus.java#L25