All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.actelion.research.gui.generic.GenericPoint Maven / Gradle / Ivy

There is a newer version: 2024.11.2
Show newest version
package com.actelion.research.gui.generic;

public class GenericPoint {
	public double x,y;

	public GenericPoint() {}

	public GenericPoint(double x, double y) {
		this.x = x;
		this.y = y;
	}

	public double getX() {
		return x;
	}

	public double getY() {
		return y;
	}

	public double distance(GenericPoint p) {
		double dx = x - p.x;
		double dy = y - p.y;
		return Math.sqrt(dx*dx+dy*dy);
	}

	@Override
	public String toString() {
		return "x:"+x+" y:"+y;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy