static void PrintChromaticityCoordinates(ChromaticityCoordinates coordinates) { Console.WriteLine("CIE chromaticity coordinates"); Console.WriteLine($"Red: ({coordinates.RedX}, {coordinates.RedY})"); Console.WriteLine($"Green: ({coordinates.GreenX}, {coordinates.GreenY})"); Console.WriteLine($"Blue: ({coordinates.BlueX}, {coordinates.BlueY})"); Console.WriteLine($"White: ({coordinates.WhiteX}, {coordinates.WhiteY})"); }
protected bool Equals(IRGBWorkingSpace other) { if (other == null) { throw new ArgumentNullException("other"); } return(Equals(WhitePoint, other.WhitePoint) && ChromaticityCoordinates.Equals(other.ChromaticityCoordinates) && Equals(Companding, other.Companding)); }
/// <inheritdoc cref="object" /> public override int GetHashCode() { unchecked { var hashCode = WhitePoint.GetHashCode(); hashCode = (hashCode * 397) ^ ChromaticityCoordinates.GetHashCode(); hashCode = (hashCode * 397) ^ (Companding != null ? Companding.GetHashCode() : 0); return(hashCode); } }
/// <inheritdoc cref="object" /> public bool Equals(IRGBWorkingSpace other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(WhitePoint, other.WhitePoint) && ChromaticityCoordinates.Equals(other.ChromaticityCoordinates) && Companding.Equals(other.Companding)); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(ChromaticityCoordinates other) => _r.Equals(other._r) && _g.Equals(other._g) && _b.Equals(other._b);