title: Value of elements of a vector2 floored after putting in an List
body: <p>I know the question looks stupid and i don't know whats wrong with my code, i have been tying to figure it out what's wrong with it but no success</p>
  
  <p>When i put Vector2s in a List, the values of elements of Vector2s are all floored but it works fine with Arrays.</p>
  
  <pre><code>   private Array&lt;Float&gt; generateBorderVertices() {
  
      Vector2[] _hillKeyPoints = generateTheHills();
      Array&lt;Float&gt; borderVertices = new Array&lt;&gt;();
  
      List&lt;Vector2&gt; vertices = new ArrayList&lt;&gt;();
  
      int kHillSegmentWidth = 10;
  
      for (int i = 1; i &lt; kMaxHillKeyPoints; i++) {
  
          Vector2 p0 = _hillKeyPoints[i - 1];
          Vector2 p1 = _hillKeyPoints[i];
          int hSegments = (int) Math.floor((p1.x - p0.x) / kHillSegmentWidth);
  
          float dx = (p1.x - p0.x) / hSegments;
          float da = MathUtils.PI / hSegments;
          float ymid = (p0.y + p1.y) / 2;
          float ampl = (p0.y - p1.y) / 2;
  
          Vector2 pt0;
          Vector2 pt1 = new Vector2();
          pt0 = p0;
          borderVertices.add(pt0.x);
          borderVertices.add(pt0.y);
          vertices.add(pt0);
          for (int j = 0; j &lt; hSegments + 1; ++j) {
  
  
              pt1.x = p0.x + j * dx;
              pt1.y = ymid + ampl * MathUtils.cos(da * j);
  
              //Using a List. here i put the Vector2s into a List
              vertices.add(pt1);
              //End
  
              //Using Array
              borderVertices.add(pt0.x);
              borderVertices.add(pt0.y);
              borderVertices.add(pt1.x);
              borderVertices.add(pt1.y);
  
  
              pt0 = pt1;
          }
      }
      //While accessing them, they are all floored ?!
      vertices.forEach(System.out::println);
  
      return borderVertices;
  }
  </code></pre>