public void Factor(ColorF4 p, float factor) { float f1 = 1.0f - factor, f2 = factor; A = (A * f1) + (p.A * f2); R = (R * f1) + (p.R * f2); G = (G * f1) + (p.G * f2); B = (B * f1) + (p.B * f2); }
public float DistanceTo(ColorF4 p) { float a = A - p.A; float r = R - p.R; float g = G - p.G; float b = B - p.B; return((a * a) + (r * r) + (g * g) + (b * b)); }
public float DistanceTo(ColorF4 p) { float a = A - p.A; float r = R - p.R; float g = G - p.G; float b = B - p.B; return (a * a) + (r * r) + (g * g) + (b * b); }
public static ColorF4 Factor(ColorF4 p1, ColorF4 p2, float factor) { float f1 = factor, f2 = 1.0f - factor; return new ColorF4((p1.A * f1) + (p2.A * f2), (p1.R * f1) + (p2.R * f2), (p1.G * f1) + (p2.G * f2), (p1.B * f1) + (p2.B * f2)); }
public static ColorF4 Factor(ColorF4 p1, ColorF4 p2, float factor) { float f1 = factor, f2 = 1.0f - factor; return(new ColorF4((p1.A * f1) + (p2.A * f2), (p1.R * f1) + (p2.R * f2), (p1.G * f1) + (p2.G * f2), (p1.B * f1) + (p2.B * f2))); }