Package mikera.vectorz.util

Source Code of mikera.vectorz.util.TestMatrixBuilder

package mikera.vectorz.util;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import mikera.matrixx.AMatrix;
import mikera.vectorz.Vector;
import mikera.vectorz.Vector3;

import org.junit.Test;

public class TestMatrixBuilder {
 
  @Test public void testBuild() {
    MatrixBuilder mb=new MatrixBuilder();
   
    mb.append(Vector3.of(1,0,0));
    mb.append(new double[] {0,1,0});
    mb.append(Vector.of(0,0).join(Vector.of(1)));
   
    AMatrix m= mb.toMatrix();
   
    assertEquals(3,m.rowCount());
    assertTrue(m.isIdentity());
  }
}
TOP

Related Classes of mikera.vectorz.util.TestMatrixBuilder

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.