All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jeometry.sample.FirstSample Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package org.jeometry.sample;

import org.jeometry.Jeometry;
import org.jeometry.factory.JeometryFactory;
import org.jeometry.math.Matrix;
import org.jeometry.math.Quaternion;
import org.jeometry.math.Vector;

/**
 * A first sample program.
 *
 */
public class FirstSample {

	/**
	 * The main method.
	 * @param args program arguments
	 */
	public static void main(String[] args) {
		
		// Create a 3x3 matrix
		Matrix m = JeometryFactory.createMatrix(3, 3);
		
		// Create a vector of dimension 3
		Vector v = JeometryFactory.createVector(3);
		
		// Create a quaternion
		Quaternion q = JeometryFactory.createQuaternion();
		
		System.out.println("Matrix m: ");
		Jeometry.print(m, System.out, "  ");
		System.out.println();
		
		System.out.println("Vector v: "+v.toString());
		
		System.out.println("Quaternion q: "+q.toString());
		
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy