File tree Expand file tree Collapse file tree
src/dotnetCampus.OpenXMLUnitConverter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public EmuPoint(Emu x, Emu y)
3131 /// <inheritdoc />
3232 public bool Equals ( EmuPoint other )
3333 {
34- return X . Equals ( other . X ) ;
34+ return X . Equals ( other . X ) && Y . Equals ( other . Y ) ;
3535 }
3636
3737 /// <inheritdoc />
@@ -43,21 +43,30 @@ public override bool Equals(object? obj)
4343 /// <inheritdoc />
4444 public override int GetHashCode ( )
4545 {
46- return X . GetHashCode ( ) ;
46+ unchecked
47+ {
48+ return ( X . GetHashCode ( ) * 397 ) ^ Y . GetHashCode ( ) ;
49+ }
4750 }
4851
4952 /// <summary>
5053 /// 判断相等
5154 /// </summary>
52- public static bool operator == ( in EmuPoint left , in EmuPoint right )
55+ /// <param name="left"></param>
56+ /// <param name="right"></param>
57+ /// <returns></returns>
58+ public static bool operator == ( EmuPoint left , EmuPoint right )
5359 {
5460 return left . Equals ( right ) ;
5561 }
5662
5763 /// <summary>
5864 /// 判断不相等
5965 /// </summary>
60- public static bool operator != ( in EmuPoint left , in EmuPoint right )
66+ /// <param name="left"></param>
67+ /// <param name="right"></param>
68+ /// <returns></returns>
69+ public static bool operator != ( EmuPoint left , EmuPoint right )
6170 {
6271 return ! left . Equals ( right ) ;
6372 }
You can’t perform that action at this time.
0 commit comments