Package jinngine.math

Examples of jinngine.math.Matrix3


        new Matrix3().multiply((Vector3) null);
    }

    @Test
    public void testAssignTranspose() {
        final Matrix3 m = new Matrix3(1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 r = m.assignTranspose();
        assertSame(r, m);
        assertMatrixEquals(new double[]{
                    1., 4., 7.,
                    2., 5., 8.,
                    3., 6., 9.}, m);
View Full Code Here


    }

    @Test
    public void testTranspose() {
        final Matrix3 m = new Matrix3(1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 r = m.transpose();
        assertNotSame(r, m);
        assertMatrixEquals(new double[]{
                    1., 2., 3.,
                    4., 5., 6.,
                    7., 8., 9.}, m);
View Full Code Here

                    3., 6., 9.}, r);
    }

    @Test
    public void testAdd01() {
        final Matrix3 m = new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 n = new Matrix3(
                10., 20., 30.,
                40., 50., 60.,
                70., 80., 90.);
        final Matrix3 r = m.add(n);
        assertNotSame(r, m);
        assertNotSame(r, n);
        assertMatrixEquals(new double[]{
                    1., 2., 3.,
                    4., 5., 6.,
View Full Code Here

                    77., 88., 99.}, r);
    }

    @Test(expected = NullPointerException.class)
    public void testAdd02() {
        new Matrix3().add(null);
    }
View Full Code Here

        new Matrix3().add(null);
    }

    @Test
    public void testAssignAdd01() {
        final Matrix3 m = new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 n = new Matrix3(
                10., 20., 30.,
                40., 50., 60.,
                70., 80., 90.);
        final Matrix3 r = m.assignAdd(n);
        assertSame(r, m);
        assertNotSame(r, n);
        assertMatrixEquals(new double[]{
                    10., 20., 30.,
                    40., 50., 60.,
View Full Code Here

                    77., 88., 99.}, r);
    }

    @Test(expected = NullPointerException.class)
    public void testAssignAdd02() {
        new Matrix3().assignAdd(null);
    }
View Full Code Here

        new Matrix3().assignAdd(null);
    }

    @Test
    public void testSub01() {
        final Matrix3 m = new Matrix3(
                -1., -2., -3.,
                -4., -5., -6.,
                -7., -8., -9.);
        final Matrix3 n = new Matrix3(
                10., 20., 30.,
                40., 50., 60.,
                70., 80., 90.);
        final Matrix3 r = m.subtract(n);
        assertNotSame(r, m);
        assertNotSame(r, n);
        assertMatrixEquals(new double[]{
                    -1., -2., -3.,
                    -4., -5., -6.,
View Full Code Here

                    -77., -88., -99.}, r);
    }

    @Test(expected = NullPointerException.class)
    public void testSub02() {
        new Matrix3().subtract(null);
    }
View Full Code Here

        new Matrix3().subtract(null);
    }

    @Test
    public void testAssignSub01() {
        final Matrix3 m = new Matrix3(
                -1., -2., -3.,
                -4., -5., -6.,
                -7., -8., -9.);
        final Matrix3 n = new Matrix3(
                10., 20., 30.,
                40., 50., 60.,
                70., 80., 90.);
        final Matrix3 r = m.assignSubtract(n);
        assertSame(r, m);
        assertNotSame(r, n);
        assertMatrixEquals(new double[]{
                    10., 20., 30.,
                    40., 50., 60.,
View Full Code Here

                    -77., -88., -99.}, r);
    }

    @Test(expected = NullPointerException.class)
    public void testAssignSub02() {
        new Matrix3().assignSubtract(null);
    }
View Full Code Here

TOP

Related Classes of jinngine.math.Matrix3

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.