You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2014/04/09 00:16:09 UTC
[11/50] [abbrv] git commit: The if statement did not match the
assignment order.
The if statement did not match the assignment order.
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/deabbf73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/deabbf73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/deabbf73
Branch: refs/heads/master
Commit: deabbf7307f5612e4f8a0c0c3efb03c5c290f2bf
Parents: 3d64ae3
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 17:08:38 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700
----------------------------------------------------------------------
.../vxquery/datamodel/accessors/atomic/XSDecimalPointable.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/deabbf73/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
index 0ebcd29..8aca4a0 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
@@ -70,9 +70,9 @@ public class XSDecimalPointable extends AbstractPointable implements IHashable,
// TODO double check that precision is not being lost.
int diff = p - op;
if (diff > 0) {
- v = Math.round(v / Math.pow(10, diff));
- } else if (diff < 0) {
ov = Math.round(ov / Math.pow(10, diff));
+ } else if (diff < 0) {
+ v = Math.round(v / Math.pow(10, diff));
}
return v < ov ? -1 : (v > ov ? 1 : 0);