@Override public String toString() { return toString(this); }
@Nonnull @Override public ExtendedConstant create() { final ExtendedConstant result = new ExtendedConstant(); result.constant = constant; result.value = value; result.javaString = javaString; result.description = description; return result; } }
@Override public int compareTo(ExtendedConstant o) { return this.constant.compareTo(o.getConstant()); } }
@Override public String toString() { return ExtendedConstant.toString(this); }
public ConstantsRegistry() { this.add(new PiConstant()); this.add(new ExtendedConstant(Constants.PI_INV, Math.PI, null)); this.add(new ExtendedConstant(Constants.INF, Double.POSITIVE_INFINITY, "JsclDouble.valueOf(Double.POSITIVE_INFINITY)")); this.add(new ExtendedConstant(Constants.INF_2, Double.POSITIVE_INFINITY, "JsclDouble.valueOf(Double.POSITIVE_INFINITY)")); this.add(new ExtendedConstant(Constants.I, "√(-1)", null)); this.add(new ExtendedConstant(new Constant(E), Math.E, null)); this.add(new ExtendedConstant(new Constant(C), C_VALUE, null)); this.add(new ExtendedConstant(new Constant(G), G_VALUE, null)); this.add(new ExtendedConstant(new Constant(H_REDUCED), H_REDUCED_VALUE, null)); this.add(new ExtendedConstant(new Constant(NAN), Double.NaN, null)); } }