~ludwig.schmidt/jhelioviewer/jhv-plugins

« back to all changes in this revision

Viewing changes to src/org/helioviewer/base/math/Vector2dDouble.java

  • Committer: Ludwig Schmidt
  • Date: 2009-08-18 20:45:25 UTC
  • mfrom: (1.1.8 jhv-ludwig)
  • Revision ID: ludwigschmidt2@gmail.com-20090818204525-nxvg9ipaspngvxzk
merge with ludwig's branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
            final Vector2dDouble v2) {
181
181
        return Math.acos((v1.x * v2.x + v1.y * v2.y)
182
182
                / ((Math.sqrt(v1.x * v1.x + v1.y * v1.y))
183
 
                * (Math.sqrt(v2.x * v2.x + v2.y * v2.y))));
 
183
                        * (Math.sqrt(v2.x * v2.x + v2.y * v2.y))));
184
184
    }
185
185
 
186
186
    public Vector2dDouble absolute() {
224
224
        long xBits = Double.doubleToLongBits(x);
225
225
        long yBits = Double.doubleToLongBits(y);
226
226
        return HASH_CODE_INITIAL_VALUE * HASH_CODE_MULTIPLIER
227
 
                * HASH_CODE_MULTIPLIER
228
 
            + HASH_CODE_MULTIPLIER
229
 
                * (int) (xBits ^ (xBits >>> HASH_CODE_INT_BITS))
230
 
            + (int) (yBits ^ (yBits >>> HASH_CODE_INT_BITS));
 
227
        * HASH_CODE_MULTIPLIER
 
228
        + HASH_CODE_MULTIPLIER
 
229
        * (int) (xBits ^ (xBits >>> HASH_CODE_INT_BITS))
 
230
        + (int) (yBits ^ (yBits >>> HASH_CODE_INT_BITS));
231
231
    }
232
232
 
233
233
    @Override public String toString() {