net.sourceforge.plantuml.golem.MinMaxDouble Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.golem;
public class MinMaxDouble {
private double minX = Double.MAX_VALUE;
private double minY = Double.MAX_VALUE;
private double maxX = -Double.MAX_VALUE;
private double maxY = -Double.MAX_VALUE;
public void manage(double x, double y) {
if (x < minX) {
minX = x;
}
if (y < minY) {
minY = y;
}
if (x > maxX) {
maxX = x;
}
if (y > maxY) {
maxY = y;
}
}
public double getMinX() {
return minX;
}
public double getMinY() {
return minY;
}
public double getMaxX() {
return maxX;
}
public double getMaxY() {
return maxY;
}
public double getWidth() {
return maxX - minX + 1;
}
public double getHeight() {
return maxY - minY + 1;
}
}