public Colour256(double r, double g, double b, double a) { this.R = RayMath.Clamp(r, MinValue, MaxValue); this.G = RayMath.Clamp(g, MinValue, MaxValue); this.B = RayMath.Clamp(b, MinValue, MaxValue); this.A = RayMath.Clamp(a, MinValue, MaxValue); }
public Colour32(int r, int g, int b, int a) { this.R = (byte)RayMath.Clamp(r, MinValue, MaxValue); this.G = (byte)RayMath.Clamp(g, MinValue, MaxValue); this.B = (byte)RayMath.Clamp(b, MinValue, MaxValue); this.A = (byte)RayMath.Clamp(a, MinValue, MaxValue); }