Compares two numeric tokens and returns an integer. @param value1 first value @param value2 second value @return result
(final byte[] value1, final byte[] value2)
| 567 | * @return result |
| 568 | */ |
| 569 | private static int cmpNum(final byte[] value1, final byte[] value2) { |
| 570 | final double n = Token.toDouble(value1) - Token.toDouble(value2); |
| 571 | return n > 0 ? 1 : n < 0 ? -1 : 0; |
| 572 | } |
| 573 | |
| 574 | /** |
| 575 | * Compares two tokens and returns an integer. |