Examples of Matrix3


Examples of jinngine.math.Matrix3

                new Vector3());
    }

    @Test(expected = NullPointerException.class)
    public void testCtor05() {
        final Matrix3 m = new Matrix3(
                new Vector3(),
                new Vector3(),
                null);
    }
View Full Code Here

Examples of jinngine.math.Matrix3

                null);
    }

    @Test
    public void testCtorMatrix() {
        final Matrix3 m = new Matrix3(new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.));

        assertMatrixEquals(new double[]{
View Full Code Here

Examples of jinngine.math.Matrix3

                    7., 8., 9.}, m);
    }

    @Test
    public void testAssignMatrix() {
        final Matrix3 m = new Matrix3();
        final Matrix3 r = m.assign(new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.));
        assertSame(r, m);//assert it return this
        //assert every value is 0.
View Full Code Here

Examples of jinngine.math.Matrix3

    }

    @Test
    public void testCtorMatrix4() {
        final Matrix3 m = new Matrix3(new Matrix4(
                1., 2., 3., -1.,
                4., 5., 6., -1.,
                7., 8., 9., -1.,
                -1., -1., -1., -1.));
View Full Code Here

Examples of jinngine.math.Matrix3

                    7., 8., 9.}, m);
    }

    @Test
    public void testFtorIdentity() {
        final Matrix3 m = Matrix3.identity();
        final Matrix3 n = Matrix3.identity();
        assertNotSame(n, m);//create a new referene everytime like a ctor
        assertMatrixEquals(new double[]{
                    1., 0., 0.,
                    0., 1., 0.,
                    0., 0., 1.}, m);
View Full Code Here

Examples of jinngine.math.Matrix3

                    0., 0., 1.}, m);
    }

    @Test
    public void testAssignIdentity() {
        final Matrix3 m = new Matrix3(
                7., 2., 3.,
                4., 5., 6.,
                1., 8., 9.);
        final Matrix3 r = m.assignIdentity();
        assertSame(r, m);//assert it return this
        assertMatrixEquals(new double[]{
                    1., 0., 0.,
                    0., 1., 0.,
                    0., 0., 1.}, m);
View Full Code Here

Examples of jinngine.math.Matrix3

                    0., 0., 1.}, m);
    }

    @Test
    public void testFtorScaleDouble() {
        final Matrix3 m = Matrix3.scaleMatrix(3.);
        final Matrix3 n = Matrix3.scaleMatrix(3.);
        assertNotSame(n, m);//create a new referene everytime like a ctor
        assertMatrixEquals(new double[]{
                    3., 0., 0.,
                    0., 3., 0.,
                    0., 0., 3.}, m);
View Full Code Here

Examples of jinngine.math.Matrix3

                    0., 0., 3.}, m);
    }

    @Test
    public void testAssignScaleDouble() {
        final Matrix3 m = new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 r = m.assignScale(3.);
        assertSame(r, m);//assert it return this
        assertMatrixEquals(new double[]{
                    3., 0., 0.,
                    0., 3., 0.,
                    0., 0., 3.}, m);
View Full Code Here

Examples of jinngine.math.Matrix3

                    0., 0., 3.}, m);
    }

    @Test
    public void testFtorScale3Double() {
        final Matrix3 m = Matrix3.scaleMatrix(2., 3., 4.);
        final Matrix3 n = Matrix3.scaleMatrix(2., 3., 4.);
        assertNotSame(n, m);//create a new referene everytime like a ctor
        assertMatrixEquals(new double[]{
                    2., 0., 0.,
                    0., 3., 0.,
                    0., 0., 4.}, m);
View Full Code Here

Examples of jinngine.math.Matrix3

                    0., 0., 4.}, m);
    }

    @Test
    public void testAssign3Double() {
        final Matrix3 m = new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 r = m.assignScale(2., 3., 4.);
        assertSame(r, m);//assert it return this
        assertMatrixEquals(new double[]{
                    2., 0., 0.,
                    0., 3., 0.,
                    0., 0., 4.}, m);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.