// Path: src/gwt/java/pythagoras/util/Platform.java
// public class Platform
// {
//     /**
//      * Returns a hash code for the supplied float value.
//      */
//     public static int hashCode (float f1) {
//         return (int)f1; // alas nothing better can be done in JavaScript
//     }
// 
//     /**
//      * Returns a hash code for the supplied double value.
//      */
//     public static int hashCode (double d1) {
//         return (int)d1; // alas nothing better can be done in JavaScript
//     }
// 
//     /**
//      * Clones the supplied array of bytes.
//      */
//     public static native byte[] clone (byte[] values) /*-{
//         return values.slice(0);
//     }-*/;
// 
//     /**
//      * Clones the supplied array of ints.
//      */
//     public static native int[] clone (int[] values) /*-{
//         return values.slice(0);
//     }-*/;
// 
//     /**
//      * Clones the supplied array of floats.
//      */
//     public static native float[] clone (float[] values) /*-{
//         return values.slice(0);
//     }-*/;
// 
//     /**
//      * Clones the supplied array of doubles.
//      */
//     public static native double[] clone (double[] values) /*-{
//         return values.slice(0);
//     }-*/;
// }


import pythagoras.util.Platform;
import java.io.Serializable;
import java.nio.DoubleBuffer;

    @Override // from interface IVector3
    public double get (int idx) {
        switch (idx) {
        case 0: return x;
        case 1: return y;
        case 2: return z;
        }
        throw new IndexOutOfBoundsException(String.valueOf(idx));
    }

    @Override // from interface IVector3
    public void get (double[] values) {
        values[0] = x;
        values[1] = y;
        values[2] = z;
    }

    @Override // from interface IVector3
    public DoubleBuffer get (DoubleBuffer buf) {
        return buf.put(x).put(y).put(z);
    }

    @Override
    public String toString () {
        return "[" + x + ", " + y + ", " + z + "]";
    }

    @Override
    public int hashCode () {
// Path: src/gwt/java/pythagoras/util/Platform.java
// public class Platform
// {
//     /**
//      * Returns a hash code for the supplied float value.
//      */
//     public static int hashCode (float f1) {
//         return (int)f1; // alas nothing better can be done in JavaScript
//     }
// 
//     /**
//      * Returns a hash code for the supplied double value.
//      */
//     public static int hashCode (double d1) {
//         return (int)d1; // alas nothing better can be done in JavaScript
//     }
// 
//     /**
//      * Clones the supplied array of bytes.
//      */
//     public static native byte[] clone (byte[] values) /*-{
//         return values.slice(0);
//     }-*/;
// 
//     /**
//      * Clones the supplied array of ints.
//      */
//     public static native int[] clone (int[] values) /*-{
//         return values.slice(0);
//     }-*/;
// 
//     /**
//      * Clones the supplied array of floats.
//      */
//     public static native float[] clone (float[] values) /*-{
//         return values.slice(0);
//     }-*/;
// 
//     /**
//      * Clones the supplied array of doubles.
//      */
//     public static native double[] clone (double[] values) /*-{
//         return values.slice(0);
//     }-*/;
// }


// Path: src/main/java/pythagoras/d/Vector3.java
import pythagoras.util.Platform;
import java.io.Serializable;
import java.nio.DoubleBuffer;


    @Override // from interface IVector3
    public double get (int idx) {
        switch (idx) {
        case 0: return x;
        case 1: return y;
        case 2: return z;
        }
        throw new IndexOutOfBoundsException(String.valueOf(idx));
    }

    @Override // from interface IVector3
    public void get (double[] values) {
        values[0] = x;
        values[1] = y;
        values[2] = z;
    }

    @Override // from interface IVector3
    public DoubleBuffer get (DoubleBuffer buf) {
        return buf.put(x).put(y).put(z);
    }

    @Override
    public String toString () {
        return "[" + x + ", " + y + ", " + z + "]";
    }

    @Override
    public int hashCode () {
        return Platform.hashCode(x) ^ Platform.hashCode(y) ^ Platform.hashCode(z);