// 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/util/SingularMatrixException.java
// public class SingularMatrixException extends RuntimeException
// {
//     private static final long serialVersionUID = -4744745375693073952L;
// 
//     /**
//      * Creates a new exception.
//      */
//     public SingularMatrixException () {
//     }
// 
//     /**
//      * Creates a new exception with the provided message.
//      */
//     public SingularMatrixException (String message) {
//         super(message);
//     }
// }


import pythagoras.util.Platform;
import pythagoras.util.SingularMatrixException;
import java.io.Serializable;
import java.nio.DoubleBuffer;
        return Math.atan2(n01, n00);
    }

    @Override // from IMatrix3
    public Vector extractScale () {
        return extractScale(new Vector());
    }

    @Override // from IMatrix3
    public Vector extractScale (Vector result) {
        double m00 = this.m00, m01 = this.m01, m10 = this.m10, m11 = this.m11;
        return result.set(Math.sqrt(m00*m00 + m01*m01),
                          Math.sqrt(m10*m10 + m11*m11));
    }

    @Override // from IMatrix3
    public double approximateUniformScale () {
        double cp = m00*m11 - m01*m10;
        return (cp < 0f) ? -Math.sqrt(-cp) : Math.sqrt(cp);
    }

    @Override
    public String toString () {
        return ("[[" + m00 + ", " + m10 + ", " + m20 + "], " +
                "["  + m01 + ", " + m11 + ", " + m21 + "], " +
                "["  + m02 + ", " + m12 + ", " + m22 + "]]");
    }

    @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/util/SingularMatrixException.java
// public class SingularMatrixException extends RuntimeException
// {
//     private static final long serialVersionUID = -4744745375693073952L;
// 
//     /**
//      * Creates a new exception.
//      */
//     public SingularMatrixException () {
//     }
// 
//     /**
//      * Creates a new exception with the provided message.
//      */
//     public SingularMatrixException (String message) {
//         super(message);
//     }
// }


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

        return Math.atan2(n01, n00);
    }

    @Override // from IMatrix3
    public Vector extractScale () {
        return extractScale(new Vector());
    }

    @Override // from IMatrix3
    public Vector extractScale (Vector result) {
        double m00 = this.m00, m01 = this.m01, m10 = this.m10, m11 = this.m11;
        return result.set(Math.sqrt(m00*m00 + m01*m01),
                          Math.sqrt(m10*m10 + m11*m11));
    }

    @Override // from IMatrix3
    public double approximateUniformScale () {
        double cp = m00*m11 - m01*m10;
        return (cp < 0f) ? -Math.sqrt(-cp) : Math.sqrt(cp);
    }

    @Override
    public String toString () {
        return ("[[" + m00 + ", " + m10 + ", " + m20 + "], " +
                "["  + m01 + ", " + m11 + ", " + m21 + "], " +
                "["  + m02 + ", " + m12 + ", " + m22 + "]]");
    }

    @Override
    public int hashCode () {
        return Platform.hashCode(m00) ^ Platform.hashCode(m10) ^ Platform.hashCode(m20) ^