|
static String | c2hex (Color c) |
|
static String | f2hex (float f) |
|
static double[] | getMinMax (double[] a) |
|
static double[] | getMinMax (float[] a) |
|
static double[] | toDouble (float[] a) |
|
static float[] | toFloat (double[] a) |
|
static String | fixNewLines (String s) |
|
static double | parseDouble (String s, double defaultValue) |
|
static double | parseDouble (String s) |
|
static int | getDecimalPlaces (double n1, double n2) |
|
|
static final char[] | hexDigits = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'} |
|
This class contains static utility methods.
Definition at line 5 of file Tools.java.
static String c2hex |
( |
Color |
c | ) |
|
|
inlinestatic |
Converts a Color to an 7 byte hex string starting with '#'.
Definition at line 10 of file Tools.java.
static String f2hex |
( |
float |
f | ) |
|
|
inlinestatic |
Converts a float to an 9 byte hex string starting with '#'.
Definition at line 22 of file Tools.java.
static String fixNewLines |
( |
String |
s | ) |
|
|
inlinestatic |
Converts carriage returns to line feeds.
Definition at line 86 of file Tools.java.
static int getDecimalPlaces |
( |
double |
n1, |
|
|
double |
n2 |
|
) |
| |
|
inlinestatic |
Returns the number of decimal places need to display two numbers.
Definition at line 124 of file Tools.java.
static double parseDouble |
( |
String |
s, |
|
|
double |
defaultValue |
|
) |
| |
|
inlinestatic |
Returns a double containg the value represented by the specified String
.
- Parameters
-
s | the string to be parsed. |
defaultValue | the value returned if s does not contain a parsable double |
- Returns
- The double value represented by the string argument or
defaultValue
if the string does not contain a parsable double
Definition at line 103 of file Tools.java.
static double parseDouble |
( |
String |
s | ) |
|
|
inlinestatic |
Returns a double containg the value represented by the specified String
.
- Parameters
-
s | the string to be parsed. |
- Returns
- The double value represented by the string argument or Double.NaN if the string does not contain a parsable double
Definition at line 119 of file Tools.java.
static double [] toDouble |
( |
float[] |
a | ) |
|
|
inlinestatic |
Converts the float array 'a' to a double array.
Definition at line 68 of file Tools.java.
static float [] toFloat |
( |
double[] |
a | ) |
|
|
inlinestatic |
Converts the double array 'a' to a float array.
Definition at line 77 of file Tools.java.
final char [] hexDigits = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'} |
|
static |
This array contains the 16 hex digits '0'-'F'.
Definition at line 7 of file Tools.java.
The documentation for this class was generated from the following file:
- /Users/webmaster/Desktop/squiz_matrix/fudge/image_editor/src/ij/util/Tools.java