@@ -136,6 +136,16 @@ public abstract class AbstractVector implements IVector
|
||||
return result.set(x() + x, y() + y);
|
||||
}
|
||||
|
||||
@Override // from interface IVector
|
||||
public Vector subtract (float x, float y) {
|
||||
return subtract(x, y, new Vector());
|
||||
}
|
||||
|
||||
@Override // from interface IVector
|
||||
public Vector subtract (float x, float y, Vector result) {
|
||||
return result.set(x() - x, y() - y);
|
||||
}
|
||||
|
||||
@Override // from interface IVector
|
||||
public Vector addScaled (IVector other, float v) {
|
||||
return addScaled(other, v, new Vector());
|
||||
|
||||
@@ -115,6 +115,14 @@ public interface IVector
|
||||
* @return a reference to the result, for chaining. */
|
||||
Vector subtract (IVector other, Vector result);
|
||||
|
||||
/** Subtracts a vector from this one.
|
||||
* @return a new vector containing the result. */
|
||||
Vector subtract (float x, float y);
|
||||
|
||||
/** Subtracts a vector from this one and places the result in the supplied object.
|
||||
* @return a reference to the result, for chaining. */
|
||||
Vector subtract (float x, float y, Vector result);
|
||||
|
||||
/** Rotates this vector by the specified angle.
|
||||
* @return a new vector containing the result. */
|
||||
Vector rotate (float angle);
|
||||
|
||||
Reference in New Issue
Block a user