1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Make sure that BigDecimal.round() works out of the box without having to convert to double first

This commit is contained in:
Reinhard Pointner 2017-04-09 16:01:45 +08:00
parent c357007510
commit 8649f506a4

View File

@ -80,6 +80,10 @@ public class ExpressionFormatMethods {
return pad(self.toString(), length, "0");
}
public static double round(Number self, int precision) {
return DefaultGroovyMethods.round(self.doubleValue(), precision);
}
/**
* Return a substring matching the given pattern or break.
*/