Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Vertex {
- double x;
- double y;
- public Vertex (double x,double y){
- this.x = x;
- this.y = y;
- }
- public String toString(){
- return "x:"+this.x+"y:"+this.y;
- }
- public void moveTo (Vertex b){
- this.x += b.x;
- this.y += b.y;
- }
- public void setTo (Vertex b){
- this.x = b.x;
- this.y = b.y;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement