sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1795903 - /sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
Date Tue, 23 May 2017 12:44:52 GMT
Author: desruisseaux
Date: Tue May 23 12:44:52 2017
New Revision: 1795903

URL: http://svn.apache.org/viewvc?rev=1795903&view=rev
Log:
Invoke floatValue(…) instead than doubleValue(…) followed by a cast.

Modified:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java?rev=1795903&r1=1795902&r2=1795903&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java [UTF-8]
Tue May 23 12:44:52 2017
@@ -1025,11 +1025,11 @@ public abstract class Vector extends Abs
      * @see #floatValue(int)
      */
     public float[] floatValues() {
-        final float[] copy = new float[size()];
-        for (int i=0; i<copy.length; i++) {
-            copy[i] = (float) doubleValue(i);
+        final float[] array = new float[size()];
+        for (int i=0; i<array.length; i++) {
+            array[i] = floatValue(i);
         }
-        return copy;
+        return array;
     }
 
     /**



Mime
View raw message