org.psjava.ds.math.Vector2D Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of psjava Show documentation
Show all versions of psjava Show documentation
Problem Solving Library for Java
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