mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-26 22:14:08 +08:00
Refactor Code Style (#4151)
This commit is contained in:
@ -21,7 +21,7 @@ public class GuassLegendre {
|
||||
|
||||
double a = 1, b = Math.pow(2, -0.5), t = 0.25, p = 1;
|
||||
for (int i = 0; i < l; ++i) {
|
||||
double temp[] = update(a, b, t, p);
|
||||
double[] temp = update(a, b, t, p);
|
||||
a = temp[0];
|
||||
b = temp[1];
|
||||
t = temp[2];
|
||||
@ -32,7 +32,7 @@ public class GuassLegendre {
|
||||
}
|
||||
|
||||
static double[] update(double a, double b, double t, double p) {
|
||||
double values[] = new double[4];
|
||||
double[] values = new double[4];
|
||||
values[0] = (a + b) / 2;
|
||||
values[1] = Math.sqrt(a * b);
|
||||
values[2] = t - p * Math.pow(a - values[0], 2);
|
||||
|
Reference in New Issue
Block a user