package projectzombie.util;

import gl_engine.MathHelpers;
import gl_engine.vec.Vec3d;

public class ColorRange
{
	public Vec3d min, max;
	
	public ColorRange(Vec3d colorMin, Vec3d colorMax) {
		this.min = colorMin;
		this.max = colorMax;
	}
	
	public Vec3d getColor(double v) {
		return new Vec3d(
				MathHelpers.map(v, 0, 1, min.x, max.x),
				MathHelpers.map(v, 0, 1, min.y, max.y),
				MathHelpers.map(v, 0, 1, min.z, max.z));
	}
}
