|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.angrypeptide.fun.Shot
public class Shot
This class represents a shot
Constructor Summary | |
---|---|
Shot(double energy,
double angle)
Constructor |
Method Summary | |
---|---|
double |
getAngle()
|
double |
getDistance()
Returns the distance of the shoot |
double |
getEnergy()
|
static double |
getEnergyForDistance(double distance,
double angle)
returns the energy necessary to shoot at a given distance with the given angle |
static double |
getMinEnergyForDistance(double distance)
Returns the minimal energy to reach the distance |
static double |
getRandomAngle()
Returns a random angle |
static double |
getRandomAngleForDistance(double distance,
double maxEnergy)
Returns a random angle allowing shooting at a given distance given the max energy available. |
double |
getScore()
|
void |
setScore(double score)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Shot(double energy, double angle)
energy
- the energy of the shootangle
- the angle of the shootMethod Detail |
---|
public double getEnergy()
public double getAngle()
public double getDistance()
public static double getEnergyForDistance(double distance, double angle)
distance
- angle
- the angle in degree (must be between 0 and 90)
public static double getMinEnergyForDistance(double distance)
distance
-
public static double getRandomAngle()
public static double getRandomAngleForDistance(double distance, double maxEnergy)
distance
- maxEnergy
-
public double getScore()
public void setScore(double score)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |