function rnd(mi, ma)
	return mi + (ma - mi) * math.random(0, 1000) / 1000
end

function RandomVec(min, max)
	return Vec(rnd(min, max), rnd(min, max), rnd(min, max))
end

function RandomSeedVec(seed)
	return RandomVec(-seed, seed)
end

function Clamp(value, mi, ma)
	if value < mi then value = mi end
	if value > ma then value = ma end
	return value
end

function EvenVec(value)
	return Vec(value, value, value)
end