package GrandeursPhysiques;

public class Point {
	protected double x;
	protected double y;
	public Point(double x, double y){
		this.x=x;
		this.y=y;
	}
	public double getX() {
		return x;
	}
	public void setX(double x) {
		this.x = x;
	}
	public double getY() {
		return y;
	}
	public void setY(double y) {
		this.y = y;
	}
	public Point coordEnPixels(){
		double newX=x*20+300;
		double newY=300-20*y;
		Point p=new Point(newX,newY);
		return p;
	}
	public Point pixelEnCoord(Point p){
		double newX=p.getX()-300;
		newX=newX/20;
		double newY=300-p.getY();
		newY=newY/20;
		Point p1=new Point(newX,newY);
		return p1;
	}
}
