added JavaDocs to the FloatMath class
This commit is contained in:
@@ -163,18 +163,45 @@ public static float atan2(float fY, float fX) {
|
||||
return (float) Math.atan2(fY, fX);
|
||||
}
|
||||
|
||||
/**
|
||||
* A direct call to Math.sinh.
|
||||
*
|
||||
* @param x The value for which to compute the hyperbolic sine
|
||||
* @return Math.sinh(x)
|
||||
* @see Math#sinh(double)
|
||||
*/
|
||||
public static float sinh(float x) {
|
||||
return (float) Math.sinh(x);
|
||||
}
|
||||
|
||||
/**
|
||||
* A direct call to Math.cosh.
|
||||
*
|
||||
* @param x The value for which to compute the hyperbolic cosine
|
||||
* @return Math.cosh(x)
|
||||
* @see Math#cosh(double)
|
||||
*/
|
||||
public static float cosh(float x) {
|
||||
return (float) Math.cosh(x);
|
||||
}
|
||||
|
||||
/**
|
||||
* A direct call to Math.tanh.
|
||||
*
|
||||
* @param x The value for which to compute the hyperbolic tangent
|
||||
* @return Math.tanh(x)
|
||||
* @see Math#tanh(double)
|
||||
*/
|
||||
public static float tanh(float x) {
|
||||
return (float) Math.tanh(x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hyperbolic cotangent of a value.
|
||||
* @param x The value for which to compute the hyperbolic cotangent.
|
||||
* @return The hyperbolic cotangent of x.
|
||||
* @see Math#tanh(double)
|
||||
*/
|
||||
public static float coth(float x) {
|
||||
return (float) (1d / Math.tanh(x));
|
||||
}
|
||||
@@ -239,6 +266,14 @@ public static float exp(float fValue) {
|
||||
return (float) Math.exp(fValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns e^fValue - 1.
|
||||
* This is equivalent to calling Math.expm1.
|
||||
*
|
||||
* @param fValue The exponent to raise e to, minus 1.
|
||||
* @return The result of e^fValue - 1.
|
||||
* @see Math#expm1(double)
|
||||
*/
|
||||
public static float expm1(float fValue) {
|
||||
return (float) Math.expm1(fValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user