fromList

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

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

If the size of the list of coordinates is different than 2, IllegalArgumentException is thrown.