class Displacement{ float x,y; PVector v; float length; Displacement (float x, float y, PVector v){ this.x = x; this.y = y; this.v = v; } Displacement (float x, float y, float x2, float y2){ this.x = x; this.y = y; this.v = new PVector(x2-x,y2-y); } }