public class FormatUtilities extends Object
This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST).
Constructor and Description |
---|
FormatUtilities() |
Modifier and Type | Method and Description |
---|---|
static String |
formatDouble(double inVal,
int inDecs)
Formats a double value to specified number of decimal places, including
using scientific notation if appropriate.
|
static String |
formatDouble(double inVal,
int inDecs,
int inLeftOfDec)
Formats a double value to specified number of decimal places, including
using scientific notation if appropriate.
|
static void |
writeError(Object source,
Object message)
Display a simple error message to System.err
|
public static void writeError(Object source, Object message)
public static String formatDouble(double inVal, int inDecs)
inVal
- double number to be formattedinLeftOfDec
- integer of max number of places to left of decimalpublic static String formatDouble(double inVal, int inDecs, int inLeftOfDec)
inVal
- double number to be formattedinDecs
- integer of number of decimal placesinLeftOfDec
- integer of max number of places to left of decimalCopyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.