Unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1197491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-11-04 10:27:18 +00:00
parent 3a1a95ff3c
commit 6a5a4c8ca0
2 changed files with 4 additions and 4 deletions

View File

@ -47,9 +47,9 @@ public class OpenMapRealMatrix extends AbstractRealMatrix
*/
public OpenMapRealMatrix(int rowDimension, int columnDimension) {
super(rowDimension, columnDimension);
long lRow = (long) rowDimension;
long lCol = (long) columnDimension;
if (lRow * lCol >= (long) Integer.MAX_VALUE) {
long lRow = rowDimension;
long lCol = columnDimension;
if (lRow * lCol >= Integer.MAX_VALUE) {
throw new NumberIsTooLargeException(lRow * lCol, Integer.MAX_VALUE, false);
}
this.rows = rowDimension;

View File

@ -367,7 +367,7 @@ public class MathArrays {
double s3 = 0;
double x1max = 0;
double x3max = 0;
double floatn = (double) v.length;
double floatn = v.length;
double agiant = rgiant / floatn;
for (int i = 0; i < v.length; i++) {
double xabs = Math.abs(v[i]);