Exemplo n.º 1
0
func mix(a, b geometry.Vec3, factor geometry.Float) geometry.Vec3 {
	a.X = (1-factor)*a.X + factor*b.X
	a.Y = (1-factor)*a.Y + factor*b.Y
	a.Z = (1-factor)*a.Z + factor*b.Z
	return a
}
Exemplo n.º 2
0
func CorrectColours(v geometry.Vec3) geometry.Vec3 {
	v.X = CorrectColour(v.X)
	v.Y = CorrectColour(v.Y)
	v.Z = CorrectColour(v.Z)
	return v
}