diff --git a/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java b/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java index a54e2eae44..546764b714 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java +++ b/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java @@ -19,9 +19,9 @@ public final class NumericalIntegration { } /** - * Performs Runge Kutta integration (4th order). + * Performs 4th order Runge-Kutta integration of dx/dt = f(x) for dt. * - * @param f The function to integrate, which takes one argument x. + * @param f The function to integrate. It must take one argument x. * @param x The initial value of x. * @param dtSeconds The time over which to integrate. * @return the integration of dx/dt = f(x) for dt. @@ -37,13 +37,13 @@ public final class NumericalIntegration { } /** - * Performs Runge Kutta integration (4th order). + * Performs 4th order Runge-Kutta integration of dx/dt = f(x, u) for dt. * * @param f The function to integrate. It must take two arguments x and u. * @param x The initial value of x. * @param u The value u held constant over the integration period. * @param dtSeconds The time over which to integrate. - * @return The result of Runge Kutta integration (4th order). + * @return the integration of dx/dt = f(x, u) for dt. */ public static double rk4(DoubleBinaryOperator f, double x, double u, double dtSeconds) { final var h = dtSeconds; @@ -89,7 +89,7 @@ public final class NumericalIntegration { * @param f The function to integrate. It must take one argument x. * @param x The initial value of x. * @param dtSeconds The time over which to integrate. - * @return 4th order Runge-Kutta integration of dx/dt = f(x) for dt. + * @return the integration of dx/dt = f(x) for dt. */ public static Matrix rk4( UnaryOperator> f, Matrix x, double dtSeconds) {