/** * Creates a slice over the specified array. */ public static Slice wrappedFloatArray(float... array) { return wrappedFloatArray(array, 0, array.length); }
/** * Creates a slice over the specified array. */ public static Slice wrappedFloatArray(float... array) { return wrappedFloatArray(array, 0, array.length); }
assertEquals(wrappedFloatArray(floatArray).getFloat(0), floatArray[0]); assertEquals(wrappedFloatArray(floatArray, 1, 4).getFloat(0), floatArray[1]); assertEquals(wrappedFloatArray(floatArray, 1, 4).length(), 4 * SIZE_OF_FLOAT); assertEquals(wrappedFloatArray(floatArray).getFloat(5 * SIZE_OF_FLOAT), floatArray[5]);
assertEquals(wrappedFloatArray(floatArray).getFloat(0), floatArray[0]); assertEquals(wrappedFloatArray(floatArray, 1, 4).getFloat(0), floatArray[1]); assertEquals(wrappedFloatArray(floatArray, 1, 4).length(), 4 * SIZE_OF_FLOAT); assertEquals(wrappedFloatArray(floatArray).getFloat(5 * SIZE_OF_FLOAT), floatArray[5]);