using StgSharp.Math; using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; namespace StgSharp.Vector { [StructLayout(LayoutKind.Explicit)] public struct Array2x3:IEquatable { [FieldOffset(0)] Vec3D row1; [FieldOffset(12)] Vec3D row2; public override bool Equals(object obj) { return obj is Array2x3 x && row1.Equals(x.row1) && row2.Equals(x.row2); } public override int GetHashCode() { return HashCode.Combine(row1, row2); } bool IEquatable.Equals(Array2x3 other) { if (this.GetHashCode() != other.GetHashCode()) { return false; } else { return this.row1 == other.row1 && this.row2 == other.row2; } } } }