|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRandomizer
Method Summary | |
---|---|
java.awt.Rectangle |
randomBounds(java.awt.Rectangle rect,
java.awt.Dimension maxDim)
Generates a randomly located and sized rectangle |
java.lang.Object |
randomChoice(java.lang.Object x,
java.lang.Object y,
double probX)
Returns a random choice of one of two objects, x and y, where probX is the probability that x will be picked (0<=x<=1). |
java.awt.Color |
randomColor()
Generates a random color |
java.awt.Dimension |
randomDim(java.awt.Dimension maxDim)
Returns a random square Dimension, whose width is maxDim.width/2<=width<=maxDim.width |
double |
randomDouble(double min,
double max)
Returns a random double greater than or equal to min and less than or equal to max. |
int |
randomInt(int min,
int max)
Returns a random integer greater than or equal to min and less than or equal to max. |
java.awt.Point |
randomLoc(java.awt.Dimension dim)
Generates a random location point subject to the constraint that 0<=X<=maxX and 0<=Y<=maxY. |
java.awt.Point |
randomLoc(java.awt.Rectangle rect)
Generates a random location point subject to the constraint that 0<=X<=maxX and 0<=Y<=maxY. |
java.awt.Point |
randomVel(java.awt.Rectangle rect)
Returns a random velocity (as a Point) subject to the constraint that the absolute value of the vleocity (speed) is less than maxV. |
Method Detail |
---|
java.awt.Point randomLoc(java.awt.Rectangle rect)
java.awt.Point randomLoc(java.awt.Dimension dim)
int randomInt(int min, int max)
double randomDouble(double min, double max)
java.awt.Point randomVel(java.awt.Rectangle rect)
java.awt.Dimension randomDim(java.awt.Dimension maxDim)
java.awt.Rectangle randomBounds(java.awt.Rectangle rect, java.awt.Dimension maxDim)
java.awt.Color randomColor()
java.lang.Object randomChoice(java.lang.Object x, java.lang.Object y, double probX)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |