VecmathUtil { static Vector2d scale(final Tuple2d vector, final double factor) { final Vector2d cpy = new Vector2d(vector); cpy.scale(factor); return cpy; } private  VecmathUtil();   }
@Test public void testScale() throws Exception { Vector2d vector = VecmathUtil.scale(new Vector2d(4, 2), 2.5); assertThat(vector.x, closeTo(10d, 0.01)); assertThat(vector.y, closeTo(5d, 0.01)); }