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

org.psjava.ds.math.Vector2D Maven / Gradle / Ivy

The newest version!
package org.psjava.ds.math;

public class Vector2D {
	private final T x, y;

	public static  Vector2D create(T x, T y) {
		return new Vector2D(x, y);
	}

	private Vector2D(T x, T y) {
		this.x = x;
		this.y = y;
	}

	public T x() {
		return x;
	}

	public T y() {
		return y;
	}

	@Override
	public String toString() {
		return getClass().getSimpleName() + "(" + x + "," + y + ")";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy