summaryrefslogtreecommitdiff
path: root/src/lq/Doubles.java
diff options
context:
space:
mode:
authorKjetil Ørbekk <orbekk@pvv.ntnu.no>2010-09-04 02:04:34 -0400
committerKjetil Ørbekk <orbekk@pvv.ntnu.no>2010-09-04 02:05:20 -0400
commit69dd5ce3fdc53d35da12837ac67451c159546b97 (patch)
tree36a2ff271b0471d35823bb29a47b68da8377c492 /src/lq/Doubles.java
parentec11abe2f142c45240fe9ff172aa13a2e089019f (diff)
Improve ordering on the quote page.
By default, order by timestamp (= quote submit time). Remove ordering by id.
Diffstat (limited to 'src/lq/Doubles.java')
-rw-r--r--src/lq/Doubles.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lq/Doubles.java b/src/lq/Doubles.java
new file mode 100644
index 0000000..551e65a
--- /dev/null
+++ b/src/lq/Doubles.java
@@ -0,0 +1,15 @@
+package lq;
+
+public class Doubles {
+ public static final int signum(Double d) {
+ if (d < 0.0) {
+ return -1;
+ }
+ else if (d > 0.0) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ }
+}