From ec80dd40cec9995fac6ba5a96c8eacbfafee74ae Mon Sep 17 00:00:00 2001 From: Daniel Grigencha Date: Wed, 9 Oct 2024 02:00:27 +0200 Subject: [PATCH] added JavaDocs to the FloatMath class --- .../src/main/java/pp/util/FloatMath.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Projekte/common/src/main/java/pp/util/FloatMath.java b/Projekte/common/src/main/java/pp/util/FloatMath.java index 3e00a284..09844716 100644 --- a/Projekte/common/src/main/java/pp/util/FloatMath.java +++ b/Projekte/common/src/main/java/pp/util/FloatMath.java @@ -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); }