import java.awt.*;

class MMpoint {

    public float x, y;

    MMpoint (int x, int y) {
	this.x = (float) x;
	this.y = (float) y;
    }
    
    MMpoint (float x, float y) {
	this.x = x;
	this.y = y;
    }  

    MMpoint (MMpoint p) {
        this.x = p.x;
	this.y = p.y;
    }
  
    void set (int x, int y) {
	this.x = (float) x;
	this.y = (float) y;
    }
    
    void set (float x, float y) {
	this.x = x;
	this.y = y;
    }  
    
    void set (MMpoint p) {
	this.x = p.x;
	this.y = p.y;
    }
    
    void add(MMpoint p) {
	this.x += p.x;
	this.y += p.y;
    }

    void add(Point p) {
	this.x += p.x;
	this.y += p.y;
    }

    void add(MMnormal v) {
	this.x -= v.y;
	this.y += v.x;
    }

    public static MMpoint sum(MMpoint p, MMnormal v) {
	return new MMpoint(p.x+v.y, p.y-v.x);
    }

    public void scaleBy (float scaleFactor) {
	x *= scaleFactor;
	y *= scaleFactor;
    }
}
	
