List of usage examples for org.apache.commons.math3.complex ComplexFormat ComplexFormat
public ComplexFormat(String imaginaryCharacter, NumberFormat realFormat, NumberFormat imaginaryFormat) throws NullArgumentException, NoDataException
From source file:com.autsia.bracer.BracerParser.java
/** * Set the precision of the real and imaginary parts of numbers * * @param precision Number of digits after the dot * @since 2.0/*from w w w . j a v a 2 s.c om*/ */ public void setPrecision(int precision) { numberFormat.setMinimumFractionDigits(precision); numberFormat.setMaximumFractionDigits(precision); complexFormat = new ComplexFormat(IMAGINARY, numberFormat, numberFormat); }