From faaca5beea353cef36b6060e780d72fbdfa8536c Mon Sep 17 00:00:00 2001 From: David Huynh Date: Mon, 1 Nov 2010 20:28:42 +0000 Subject: [PATCH] Fixed the GREL round function. git-svn-id: http://google-refine.googlecode.com/svn/trunk@1749 7d457c2a-affb-35e4-300a-418c747d4874 --- main/src/com/google/refine/expr/functions/math/Round.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/com/google/refine/expr/functions/math/Round.java b/main/src/com/google/refine/expr/functions/math/Round.java index 1805fb559..f1f17420e 100644 --- a/main/src/com/google/refine/expr/functions/math/Round.java +++ b/main/src/com/google/refine/expr/functions/math/Round.java @@ -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"); }