mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
public Utils.round() moved to private Localization.round()
This commit is contained in:
parent
dfaa5675b6
commit
22aa6d16a2
@ -18,6 +18,8 @@ import org.ocpsoft.prettytime.units.Decade;
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.extractor.localization.ContentCountry;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Arrays;
|
||||
@ -26,7 +28,6 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static org.schabi.newpipe.util.Utils.round;
|
||||
|
||||
/*
|
||||
* Created by chschtsch on 12/29/15.
|
||||
@ -261,4 +262,8 @@ public class Localization {
|
||||
public static void assureCorrectAppLanguage(Context c) {
|
||||
changeAppLanguage(getAppLocale(c), c.getResources());
|
||||
}
|
||||
|
||||
private static double round(double value, int places) {
|
||||
return new BigDecimal(value).setScale(places, RoundingMode.HALF_UP).doubleValue();
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
package org.schabi.newpipe.util;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
public class Utils {
|
||||
|
||||
public static double round(double value, int places) {
|
||||
return new BigDecimal(value).setScale(places, RoundingMode.HALF_UP).doubleValue();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user