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

net.sourceforge.plantuml.svek.extremity.Extremity Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.svek.extremity;

import net.sourceforge.plantuml.klimt.UTranslate;
import net.sourceforge.plantuml.klimt.geom.XPoint2D;
import net.sourceforge.plantuml.klimt.shape.UDrawable;

public abstract class Extremity implements UDrawable {

	protected double manageround(double angle) {
		final double deg = angle * 180.0 / Math.PI;
		if (isCloseTo(0, deg))
			return 0;

		if (isCloseTo(90, deg))
			return 90.0 * Math.PI / 180.0;

		if (isCloseTo(180, deg))
			return 180.0 * Math.PI / 180.0;

		if (isCloseTo(270, deg))
			return 270.0 * Math.PI / 180.0;

		if (isCloseTo(360, deg))
			return 0;

		return angle;
	}

	private boolean isCloseTo(double value, double variable) {
		if (Math.abs(value - variable) < 0.05)
			return true;

		return false;
	}

	public abstract XPoint2D somePoint();

	public XPoint2D isTooSmallSoGiveThePointCloserToThisOne(XPoint2D pt) {
		return null;
	}

	public UTranslate getDeltaForKal() {
		return UTranslate.none();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy