Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.util.math
Class OperationUtils

    java.lang.Object
      org.pdfclown.util.math.OperationUtils

    public final class OperationUtils

extends Object

Specialized math operations.

Since:
  0.0.8
Version:
  0.1.2, 11/28/11
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
`OperationUtils()`

Method Summary
`static int` | `compare(byte[] data1, byte[] data2)` Compares big-endian byte arrays.
`static int` | `compare(double value1, double value2)` Compares double-precision floating-point numbers applying the default error tolerance.
`static int` | `compare(double value1, double value2, double epsilon)` Compares double-precision floating-point numbers applying the specified error tolerance.
`static void` | `increment(byte[] data)` Increments a big-endian byte array.
`static void` | `increment(byte[] data, int position)` Increments a big-endian byte array at the specified position.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OperationUtils

    public OperationUtils()

Method Detail

### compare

    public static int compare(double value1,
                              double value2)

  Compares double-precision floating-point numbers applying the default error tolerance.

  Parameters:
    `value1` - First argument to compare.
    `value2` - Second argument to compare.
  Returns:
    How the first argument compares to the second:
    - -1, smaller;
    - 0, equal;
    - 1, greater.

### compare

    public static int compare(double value1,
                              double value2,
                              double epsilon)

  Compares double-precision floating-point numbers applying the specified error tolerance.

  Parameters:
    `value1` - First argument to compare.
    `value2` - Second argument to compare.
    `epsilon` - Relative error tolerance.
  Returns:
    How the first argument compares to the second:
    - -1, smaller;
    - 0, equal;
    - 1, greater.

### compare

    public static int compare(byte[] data1,
                              byte[] data2)

  Compares big-endian byte arrays.

  Parameters:
    `data1` - First argument to compare.
    `data2` - Second argument to compare.
  Returns:
    How the first argument compares to the second:
    - -1, smaller;
    - 0, equal;
    - 1, greater.

### increment

    public static void increment(byte[] data)

  Increments a big-endian byte array.

### increment

    public static void increment(byte[] data,
                                 int position)

  Increments a big-endian byte array at the specified position.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.