Fixed the GREL round function.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1749 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-11-01 20:28:42 +00:00
parent 1f12bfb409
commit faaca5beea

View File

@ -46,7 +46,7 @@ public class Round implements Function {
public Object call(Properties bindings, Object[] args) {
if (args.length == 1 && args[0] != null && args[0] instanceof Number) {
return ((Number) args[0]).longValue();
return Math.round(((Number) args[0]).doubleValue());
}
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a number");
}