|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.meltingice.caman.CamanUtil
public class CamanUtil
Utility class of static methods
Constructor Summary | |
---|---|
CamanUtil()
|
Method Summary | |
---|---|
static int[] |
clampRGB(double[] drgb)
Clamps an array of doubles and returns an array of integers. |
static int |
clampRGB(int val)
Clamps an integer value between 0 and 255 |
static int[] |
clampRGB(int[] rgb)
Clamps an array of integers between 0 and 255. |
static java.lang.String |
getFilterName(java.lang.String input)
Given an input string, format it to produce the class name for a filter. |
static double |
randomRange(double min,
double max)
|
static int |
randomRange(int min,
int max)
|
static double[] |
toDouble(int[] rgb)
Converts an integer array to a double array. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CamanUtil()
Method Detail |
---|
public static int clampRGB(int val)
val
- The value to clamp
public static int[] clampRGB(int[] rgb)
CamanFilter.process(int[])
rgb
- The array of integers to clamp
public static int[] clampRGB(double[] drgb)
CamanFilter.process(int[])
, and the return must be
an int array. Doubles are converted to ints by simple casting, so the
decimal portion of the double is dropped without rounding.
drgb
- The array of doubles to clamp
public static double[] toDouble(int[] rgb)
rgb
- The integer array to convert
public static java.lang.String getFilterName(java.lang.String input)
input
- The filter name
public static double randomRange(double min, double max)
public static int randomRange(int min, int max)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |