Examples of Vector3


Examples of jinngine.math.Vector3

        assertEquals(3., d[2]);
    }

    @Test
    public void testToString() {
        assertEquals(new Vector3(1., 2., 3.).toString(), "[1.0, 2.0, 3.0]");
        assertEquals(new Vector3(Double.MIN_VALUE, Double.POSITIVE_INFINITY, Double.NaN).toString(),
                "[4.9E-324, Infinity, NaN]");
    }
View Full Code Here

Examples of jinngine.math.Vector3

                "[4.9E-324, Infinity, NaN]");
    }

    @Test
    public void testCopy() {
        final Vector3 v1 = new Vector3(1., 2., 3.);
        final Vector3 v2 = new Vector3(v1);
        assertTrue(v1 != v2); //It is a new ref
        assertEquals(1., v1.x);
        assertEquals(2., v1.y);
        assertEquals(3., v1.z);
        assertEquals(1., v2.x);
View Full Code Here

Examples of jinngine.math.Vector3

    }

    @Test
    public void testAdd01() {
        final Vector3 a = new Vector3(1., 2., 3.);
        final Vector3 b = new Vector3(10., 20., 30.);
        final Vector3 r = a.add(b);
        assertTrue(r != a); //It is a new ref
        assertTrue(r != b); //It is a new ref
        assertEquals(1., a.x);
        assertEquals(2., a.y);
        assertEquals(3., a.z);
View Full Code Here

Examples of jinngine.math.Vector3

        assertEquals(33., r.z);
    }

    @Test
    public void testAdd02() {
        final Vector3 a = new Vector3(1., 4., 16.);
        final Vector3 r = a.add(a); // Just to be sure that add a ref to itself works
        assertTrue(r != a);
        assertEquals(1., a.x);
        assertEquals(4., a.y);
        assertEquals(16., a.z);
        assertEquals(2., r.x);
View Full Code Here

Examples of jinngine.math.Vector3

        assertEquals(32., r.z);
    }

    @Test(expected = NullPointerException.class)
    public void testAdd03() {
        new Vector3(1., 4., 16.).add(null);
    }
View Full Code Here

Examples of jinngine.math.Vector3

        new Vector3(1., 4., 16.).add(null);
    }

    @Test
    public void testAdd04() {
        final Vector3 a = new Vector3(1., 2., 3.);
        final Vector3 b = new Vector3(10., 20., 30.);
        Vector3.add(a, b);
        assertEquals(11., a.x);
        assertEquals(22., a.y);
        assertEquals(33., a.z);
        assertEquals(10., b.x);
View Full Code Here

Examples of jinngine.math.Vector3

        assertEquals(30., b.z);
    }

    @Test
    public void testAdd05() {
        final Vector3 a = new Vector3(1., 4., 16.);
        Vector3.add(a, a);
        assertEquals(2., a.x);
        assertEquals(8., a.y);
        assertEquals(32., a.z);
    }
View Full Code Here

Examples of libshapedraw.primitive.Vector3

    private ReadonlyVector3 getPlayerCoords() {
        if (curPlayer == null) {
            return Vector3.ZEROS;
        }
        float partialTick = getPartialTick();
        return new Vector3(
                // obf: Entity.prevPosX, Entity.posX
                curPlayer.prevPosX + partialTick*(curPlayer.posX - curPlayer.prevPosX),
                // obf: Entity.prevPosY, Entity.posY
                curPlayer.prevPosY + partialTick*(curPlayer.posY - curPlayer.prevPosY),
                // obf: Entity.prevPosZ, Entity.posZ
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.vector.Vector3

    public Vector3 getPlayerSpawnLocation(WorldServer world, EntityPlayerMP player)
    {
        if (player != null)
        {
            GCPlayerStats stats = GCPlayerStats.get(player);
            return new Vector3(stats.coordsTeleportedFromX, 250.0, stats.coordsTeleportedFromZ);
        }

        return null;
    }
View Full Code Here

Examples of mikera.vectorz.Vector3

 
  public VectorMatrixM3(int rowCount) {
    super(rowCount,3);
    rowData=new Vector3[rowCount];
    for (int i=0; i<rowCount; i++) {
      rowData[i]=new Vector3();
    }
  }
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.