fromList

fun <T : Number, Comparable<T>> fromList(list: List<T>, type: KClass<T>): Vec3<T>

Returns an instance of Vec3 with the given list of coordinates of given type.

If the size of the list of coordinates is different from 3, IllegalArgumentException is thrown.

Since

v2.0.0


fun fromList(list: List<Int>): Vec3<Int>
fun fromList(list: List<Long>): Vec3<Long>

Returns an instance of Vec3 with the given list of coordinates.

If the size of the list of coordinates is different from 3, IllegalArgumentException is thrown.

Since

v2.0.0


fun fromList(list: List<Float>): Vec3<Float>

Returns an instance of Vec3 with the given list of coordinates.

If the size of the list of coordinates is different from 3, IllegalArgumentException is thrown.