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

eu.printingin3d.physics.DoubleValue Maven / Gradle / Ivy

There is a newer version: 0.2.1.0
Show newest version
package eu.printingin3d.physics;

public abstract class DoubleValue implements Comparable {
	protected final double value;

	public static double readValue(DoubleValue dv) {
		return dv.getValue();
	}
	
	public DoubleValue(double value) {
		if (Double.isNaN(value)) {
			throw new NumberFormatException();
		}
		
		this.value = value;
	}
	
	protected double getValue() {
		return value;
	}

	@Override
	public int compareTo(DoubleValue o) {
		return Double.compare(this.value, o.value);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy