use of gnu.trove.iterator.TDoubleIterator in project Terasology by MovingBlocks.
the class TroveUtils method doubleToFloat.
public static TFloatList doubleToFloat(TDoubleList list) {
TFloatList result = new TFloatArrayList(list.size());
TDoubleIterator iterator = list.iterator();
while (iterator.hasNext()) {
double i = iterator.next();
result.add((float) i);
}
return result;
}
use of gnu.trove.iterator.TDoubleIterator in project Terasology by MovingBlocks.
the class TroveUtils method doubleToLong.
public static TLongList doubleToLong(TDoubleList list) {
TLongList result = new TLongArrayList(list.size());
TDoubleIterator iterator = list.iterator();
while (iterator.hasNext()) {
double i = iterator.next();
result.add((long) i);
}
return result;
}
use of gnu.trove.iterator.TDoubleIterator in project Terasology by MovingBlocks.
the class TroveUtils method doubleToInt.
public static TIntList doubleToInt(TDoubleList list) {
TIntList result = new TIntArrayList(list.size());
TDoubleIterator iterator = list.iterator();
while (iterator.hasNext()) {
double i = iterator.next();
result.add((int) i);
}
return result;
}
Aggregations