Skip to content
Snippets Groups Projects
Commit a561bcda authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Avoid unneccessary local variables.

parent 051469bf
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,7 @@ public class Utils {
}
public static double calculatePsnr(final double mse, final int signalMax) {
final double psnr = 10.0 * Math.log10((Math.pow(signalMax, 2) / mse));
return psnr;
return (10.0 * Math.log10((Math.pow(signalMax, 2) / mse)));
}
public static <T> boolean arrayContains(final T[] array, final T element) {
......@@ -141,8 +140,7 @@ public class Utils {
for (final int val : difference) {
sum += Math.pow(val, 2);
}
final double mse = (sum / (double) difference.length);
return mse;
return (sum / (double) difference.length);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment