Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Fix conversions to gigabits and terabits (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
j7eich authored and axkr committed Oct 20, 2019
1 parent b4b376b commit e2406a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ public double Convert(String from, String to, double input) {
}
if ((from.equals(context.getResources().getString(R.string.bitrateunitbytes))) &&
(to.equals(context.getResources().getString(R.string.bitrateunitgigabits)))) {
double ret = input * 8 / BIT_RATE_1 / BIT_RATE_1;
double ret = input * 8 / BIT_RATE_1 / BIT_RATE_1 / BIT_RATE_1;
return ret;
}

if ((from.equals(context.getResources().getString(R.string.bitrateunitbytes))) &&
(to.equals(context.getResources().getString(R.string.bitrateunitterabits)))) {
double ret = input * 8 / BIT_RATE_1 / BIT_RATE_1;
double ret = input * 8 / BIT_RATE_1 / BIT_RATE_1 / BIT_RATE_1 / BIT_RATE_1;
return ret;
}

Expand Down

0 comments on commit e2406a1

Please sign in to comment.