extends Object

class_name UTIL

# chunks array into 'chunk_size' pieces
static func chunk_array(arr: Array, chunk_size: int) -> Array:
	var result_chunks = []
	var i = 0
	while i < arr.size():
		var chunk = arr.slice(i, i + chunk_size)
		result_chunks.append(chunk)
		i += chunk_size
	return result_chunks

static func vector2_to_vector3(v: Vector2) -> Vector3:
	return Vector3(v.x, v.y, 0)
