I have an array which contains 12 numbers and I want to save this 12 numbers in 12 floats.generally how should I do this and save each one of them in one float?
array numbers = { a,b,c,....}
object1 = a;
object2 = b;
I have an array which contains 12 numbers and I want to save this 12 numbers in 12 floats.generally how should I do this and save each one of them in one float?
array numbers = { a,b,c,....}
object1 = a;
object2 = b;
int[] numbers = { 1, 2, 3, 4, 5, ... };
float f1 = (float) numbers[0];
float f2 = (float) numbers[1];
...
int[] numbers = { 1, 2, 3, 4, 5, 6 };
float[] num_floats = new float[numbers.length];
for (int i = 0; i < numbers.length; i++)
{
num_floats[i] = (float) numbers[i];
}