class Vector {

    /**
     * index of the X coordinate
     */
    private static final int I1 = 0;
    /**
     * index of the Y coordinate
     */
    private static final int I2 = 1;
    /**
     * index of the Z coordinate
     */
    private static final int I3 = 2;

    /**
     * the values inside the vector
     */
    private final float[] values = new float[]{
            0, 0, 0
    };

    /**
     * Creates a new Vector
     *
     * @param x the X coordinate
     * @param y the Y coordinate
     * @param z the Z coordinate
     */
    public Vector(float x, float y, float z) {
        values[I1] = x;
        values[I2] = y;
        values[I3] = z;
    }

    /**
     * Gets the value from a coordinate of the vector
     *
     * @param index the index of the value to get (I1, I2 or I3)
     * @return value from a coordinate of the vector
     */
    public float get(int index) {
        return values[index];
    }

    /**
     * Computes the cross product of this vector and the specified matrix
     *
     * @param by the matrix to cross this vector with
     * @return the result of the cross product
     */
    public Vector cross(Matrix by) {<FILL_FUNCTION_BODY>}

    /**
     * Computes the difference between this vector and the specified vector
     *
     * @param v the vector to subtract from this one
     * @return the results of the subtraction
     */
    public Vector subtract(Vector v) {
        float x = values[I1] - v.values[I1];
        float y = values[I2] - v.values[I2];
        float z = values[I3] - v.values[I3];

        return new Vector(x, y, z);
    }

    /**
     * Computes the sum of this vector and the specified vector
     *
     * @param v the vector to subtract from this one
     * @return the results of the subtraction
     */
    public Vector add(Vector v) {
        float x = values[I1] + v.values[I1];
        float y = values[I2] + v.values[I2];
        float z = values[I3] + v.values[I3];

        return new Vector(x, y, z);
    }

    /**
     * Computes the cross product of this vector and the specified vector
     *
     * @param with the vector to cross this vector with
     * @return the cross product
     */
    public Vector cross(Vector with) {
        float x = values[I2] * with.values[I3] - values[I3] * with.values[I2];
        float y = values[I3] * with.values[I1] - values[I1] * with.values[I3];
        float z = values[I1] * with.values[I2] - values[I2] * with.values[I1];

        return new Vector(x, y, z);
    }

    /**
     * Computes the dot product of this vector with the specified vector
     *
     * @param with the vector to dot product this vector with
     * @return the dot product
     */
    public float dot(Vector with) {
        return values[I1] * with.values[I1] + values[I2] * with.values[I2] + values[I3] * with.values[I3];
    }

    /**
     * Computes the length of this vector
     *
     * <b>Note:</b> If you are working with raw vectors from PDF, be careful -
     * the Z axis will generally be set to 1.  If you want to compute the length of a vector, subtract it from the
     * origin first (this will set the Z axis to 0).
     * <p>
     * For example:
     * <code>aVector.subtract(originVector).length();</code>
     *
     * @return the length of this vector
     */
    public float length() {
        return (float) Math.sqrt(lengthSquared());
    }

    /**
     * Computes the length squared of this vector.
     * <p>
     * The square of the length is less expensive to compute, and is often useful without taking the square root.
     * <br><br>
     * <b>Note:</b> See the important note under {@link Vector#length()}
     *
     * @return the square of the length of the vector
     */
    public float lengthSquared() {
        return values[I1] * values[I1] + values[I2] * values[I2] + values[I3] * values[I3];
    }

    /**
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return values[I1] + "," + values[I2] + "," + values[I3];
    }
}

        float x = values[I1] * by.get(Matrix.I11) + values[I2] * by.get(Matrix.I21) + values[I3] * by.get(Matrix.I31);
        float y = values[I1] * by.get(Matrix.I12) + values[I2] * by.get(Matrix.I22) + values[I3] * by.get(Matrix.I32);
        float z = values[I1] * by.get(Matrix.I13) + values[I2] * by.get(Matrix.I23) + values[I3] * by.get(Matrix.I33);

        return new Vector(x, y, z);
    
<no_super_class>