eu.printingin3d.physics.DoubleValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simplephysics Show documentation
Show all versions of simplephysics Show documentation
Simple Java Objects for SI units like frequency or current.
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