コード例 #1
0
        public bool Equals(DestinyColor input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Red == input.Red ||
                     (Red != null && Red.Equals(input.Red))
                     ) &&
                 (
                     Green == input.Green ||
                     (Green != null && Green.Equals(input.Green))
                 ) &&
                 (
                     Blue == input.Blue ||
                     (Blue != null && Blue.Equals(input.Blue))
                 ) &&
                 (
                     Alpha == input.Alpha ||
                     (Alpha != null && Alpha.Equals(input.Alpha))
                 ));
        }
コード例 #2
0
 public bool Equals(ColorBalance other) =>
 Red.Equals(other.Red) && Green.Equals(other.Green) && Blue.Equals(other.Blue);
コード例 #3
0
ファイル: Color.cs プロジェクト: KallDrexx/ray-tracer
 protected bool Equals(Color other)
 {
     return(Red.Equals(other.Red) && Green.Equals(other.Green) && Blue.Equals(other.Blue));
 }