Skip to content

Commit

Permalink
MONDRIAN: Fix 2 tests.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 10396]
  • Loading branch information
julianhyde committed Jan 6, 2008
1 parent fd0cddc commit 921455b
Show file tree
Hide file tree
Showing 2 changed files with 3,417 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/mondrian/olap/fun/vba/Vba.java
Expand Up @@ -916,7 +916,11 @@ public static double round(double number, int numDigitsAfterDecimal) {
@Description("Returns a Variant (Integer) indicating the sign of a number.")
public static int sgn(double number) {
// We could use Math.signum(double) from JDK 1.5 onwards.
return Double.compare(number, 0d);
return number < 0.0d
? -1
: number > 0.0d
? 1
: 0;
}

@FunctionName("Sin")
Expand Down

0 comments on commit 921455b

Please sign in to comment.