diff --git a/sources/Maths/Maths/Matrix2x2F.gen.cs b/sources/Maths/Maths/Matrix2x2F.gen.cs new file mode 100644 index 0000000000..a4fe3486d6 --- /dev/null +++ b/sources/Maths/Maths/Matrix2x2F.gen.cs @@ -0,0 +1,21 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix2x2F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector2F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public Vector2F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public static bool operator ==(Matrix2x2F left, Matrix2x2F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2; + public static bool operator !=(Matrix2x2F left, Matrix2x2F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix2x2F other && Equals(other); + /// + public bool Equals(Matrix2x2F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix2x2I.gen.cs b/sources/Maths/Maths/Matrix2x2I.gen.cs new file mode 100644 index 0000000000..abb70ef018 --- /dev/null +++ b/sources/Maths/Maths/Matrix2x2I.gen.cs @@ -0,0 +1,21 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix2x2I : IEquatable> where T : IBinaryInteger + { + public Vector2I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public Vector2I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public static bool operator ==(Matrix2x2I left, Matrix2x2I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2; + public static bool operator !=(Matrix2x2I left, Matrix2x2I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix2x2I other && Equals(other); + /// + public bool Equals(Matrix2x2I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix2x3F.gen.cs b/sources/Maths/Maths/Matrix2x3F.gen.cs new file mode 100644 index 0000000000..2d160ff92f --- /dev/null +++ b/sources/Maths/Maths/Matrix2x3F.gen.cs @@ -0,0 +1,23 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix2x3F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector3F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public Vector3F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public static bool operator ==(Matrix2x3F left, Matrix2x3F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2; + public static bool operator !=(Matrix2x3F left, Matrix2x3F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix2x3F other && Equals(other); + /// + public bool Equals(Matrix2x3F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix2x3I.gen.cs b/sources/Maths/Maths/Matrix2x3I.gen.cs new file mode 100644 index 0000000000..a08cb80e05 --- /dev/null +++ b/sources/Maths/Maths/Matrix2x3I.gen.cs @@ -0,0 +1,23 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix2x3I : IEquatable> where T : IBinaryInteger + { + public Vector3I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public Vector3I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public static bool operator ==(Matrix2x3I left, Matrix2x3I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2; + public static bool operator !=(Matrix2x3I left, Matrix2x3I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix2x3I other && Equals(other); + /// + public bool Equals(Matrix2x3I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix2x4F.gen.cs b/sources/Maths/Maths/Matrix2x4F.gen.cs new file mode 100644 index 0000000000..be4bcd7a7c --- /dev/null +++ b/sources/Maths/Maths/Matrix2x4F.gen.cs @@ -0,0 +1,25 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix2x4F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector4F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public static bool operator ==(Matrix2x4F left, Matrix2x4F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2; + public static bool operator !=(Matrix2x4F left, Matrix2x4F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix2x4F other && Equals(other); + /// + public bool Equals(Matrix2x4F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix2x4I.gen.cs b/sources/Maths/Maths/Matrix2x4I.gen.cs new file mode 100644 index 0000000000..957ed5cd97 --- /dev/null +++ b/sources/Maths/Maths/Matrix2x4I.gen.cs @@ -0,0 +1,25 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix2x4I : IEquatable> where T : IBinaryInteger + { + public Vector4I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public static bool operator ==(Matrix2x4I left, Matrix2x4I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2; + public static bool operator !=(Matrix2x4I left, Matrix2x4I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix2x4I other && Equals(other); + /// + public bool Equals(Matrix2x4I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix3x2F.gen.cs b/sources/Maths/Maths/Matrix3x2F.gen.cs new file mode 100644 index 0000000000..a742b8ac7a --- /dev/null +++ b/sources/Maths/Maths/Matrix3x2F.gen.cs @@ -0,0 +1,24 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix3x2F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector2F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public Vector2F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public Vector2F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public static bool operator ==(Matrix3x2F left, Matrix3x2F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3; + public static bool operator !=(Matrix3x2F left, Matrix3x2F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix3x2F other && Equals(other); + /// + public bool Equals(Matrix3x2F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix3x2I.gen.cs b/sources/Maths/Maths/Matrix3x2I.gen.cs new file mode 100644 index 0000000000..ea91c2b17c --- /dev/null +++ b/sources/Maths/Maths/Matrix3x2I.gen.cs @@ -0,0 +1,24 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix3x2I : IEquatable> where T : IBinaryInteger + { + public Vector2I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public Vector2I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public Vector2I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public static bool operator ==(Matrix3x2I left, Matrix3x2I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3; + public static bool operator !=(Matrix3x2I left, Matrix3x2I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix3x2I other && Equals(other); + /// + public bool Equals(Matrix3x2I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix3x3F.gen.cs b/sources/Maths/Maths/Matrix3x3F.gen.cs new file mode 100644 index 0000000000..4e99f7eeec --- /dev/null +++ b/sources/Maths/Maths/Matrix3x3F.gen.cs @@ -0,0 +1,27 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix3x3F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector3F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public Vector3F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public Vector3F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public static bool operator ==(Matrix3x3F left, Matrix3x3F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3; + public static bool operator !=(Matrix3x3F left, Matrix3x3F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix3x3F other && Equals(other); + /// + public bool Equals(Matrix3x3F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix3x3I.gen.cs b/sources/Maths/Maths/Matrix3x3I.gen.cs new file mode 100644 index 0000000000..f87f11633a --- /dev/null +++ b/sources/Maths/Maths/Matrix3x3I.gen.cs @@ -0,0 +1,27 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix3x3I : IEquatable> where T : IBinaryInteger + { + public Vector3I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public Vector3I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public Vector3I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public static bool operator ==(Matrix3x3I left, Matrix3x3I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3; + public static bool operator !=(Matrix3x3I left, Matrix3x3I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix3x3I other && Equals(other); + /// + public bool Equals(Matrix3x3I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix3x4F.gen.cs b/sources/Maths/Maths/Matrix3x4F.gen.cs new file mode 100644 index 0000000000..7cadcea5e4 --- /dev/null +++ b/sources/Maths/Maths/Matrix3x4F.gen.cs @@ -0,0 +1,30 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix3x4F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector4F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public Vector4F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public T M34 => Row3.W; + public static bool operator ==(Matrix3x4F left, Matrix3x4F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3; + public static bool operator !=(Matrix3x4F left, Matrix3x4F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix3x4F other && Equals(other); + /// + public bool Equals(Matrix3x4F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix3x4I.gen.cs b/sources/Maths/Maths/Matrix3x4I.gen.cs new file mode 100644 index 0000000000..531d3ce4b8 --- /dev/null +++ b/sources/Maths/Maths/Matrix3x4I.gen.cs @@ -0,0 +1,30 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix3x4I : IEquatable> where T : IBinaryInteger + { + public Vector4I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public Vector4I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public T M34 => Row3.W; + public static bool operator ==(Matrix3x4I left, Matrix3x4I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3; + public static bool operator !=(Matrix3x4I left, Matrix3x4I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix3x4I other && Equals(other); + /// + public bool Equals(Matrix3x4I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix4x2F.gen.cs b/sources/Maths/Maths/Matrix4x2F.gen.cs new file mode 100644 index 0000000000..69b77a8983 --- /dev/null +++ b/sources/Maths/Maths/Matrix4x2F.gen.cs @@ -0,0 +1,27 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix4x2F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector2F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public Vector2F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public Vector2F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public Vector2F Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public static bool operator ==(Matrix4x2F left, Matrix4x2F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4; + public static bool operator !=(Matrix4x2F left, Matrix4x2F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix4x2F other && Equals(other); + /// + public bool Equals(Matrix4x2F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix4x2I.gen.cs b/sources/Maths/Maths/Matrix4x2I.gen.cs new file mode 100644 index 0000000000..009132e9a9 --- /dev/null +++ b/sources/Maths/Maths/Matrix4x2I.gen.cs @@ -0,0 +1,27 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix4x2I : IEquatable> where T : IBinaryInteger + { + public Vector2I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public Vector2I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public Vector2I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public Vector2I Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public static bool operator ==(Matrix4x2I left, Matrix4x2I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4; + public static bool operator !=(Matrix4x2I left, Matrix4x2I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix4x2I other && Equals(other); + /// + public bool Equals(Matrix4x2I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix4x3F.gen.cs b/sources/Maths/Maths/Matrix4x3F.gen.cs new file mode 100644 index 0000000000..45645b08b7 --- /dev/null +++ b/sources/Maths/Maths/Matrix4x3F.gen.cs @@ -0,0 +1,31 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix4x3F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector3F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public Vector3F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public Vector3F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public Vector3F Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public T M43 => Row4.Z; + public static bool operator ==(Matrix4x3F left, Matrix4x3F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4; + public static bool operator !=(Matrix4x3F left, Matrix4x3F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix4x3F other && Equals(other); + /// + public bool Equals(Matrix4x3F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix4x3I.gen.cs b/sources/Maths/Maths/Matrix4x3I.gen.cs new file mode 100644 index 0000000000..3dd56f6000 --- /dev/null +++ b/sources/Maths/Maths/Matrix4x3I.gen.cs @@ -0,0 +1,31 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix4x3I : IEquatable> where T : IBinaryInteger + { + public Vector3I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public Vector3I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public Vector3I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public Vector3I Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public T M43 => Row4.Z; + public static bool operator ==(Matrix4x3I left, Matrix4x3I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4; + public static bool operator !=(Matrix4x3I left, Matrix4x3I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix4x3I other && Equals(other); + /// + public bool Equals(Matrix4x3I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix4x4F.gen.cs b/sources/Maths/Maths/Matrix4x4F.gen.cs new file mode 100644 index 0000000000..83804511cc --- /dev/null +++ b/sources/Maths/Maths/Matrix4x4F.gen.cs @@ -0,0 +1,35 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix4x4F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector4F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public Vector4F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public T M34 => Row3.W; + public Vector4F Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public T M43 => Row4.Z; + public T M44 => Row4.W; + public static bool operator ==(Matrix4x4F left, Matrix4x4F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4; + public static bool operator !=(Matrix4x4F left, Matrix4x4F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix4x4F other && Equals(other); + /// + public bool Equals(Matrix4x4F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix4x4I.gen.cs b/sources/Maths/Maths/Matrix4x4I.gen.cs new file mode 100644 index 0000000000..a49923923a --- /dev/null +++ b/sources/Maths/Maths/Matrix4x4I.gen.cs @@ -0,0 +1,35 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix4x4I : IEquatable> where T : IBinaryInteger + { + public Vector4I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public Vector4I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public T M34 => Row3.W; + public Vector4I Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public T M43 => Row4.Z; + public T M44 => Row4.W; + public static bool operator ==(Matrix4x4I left, Matrix4x4I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4; + public static bool operator !=(Matrix4x4I left, Matrix4x4I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix4x4I other && Equals(other); + /// + public bool Equals(Matrix4x4I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix5x4F.gen.cs b/sources/Maths/Maths/Matrix5x4F.gen.cs new file mode 100644 index 0000000000..5b1b50135f --- /dev/null +++ b/sources/Maths/Maths/Matrix5x4F.gen.cs @@ -0,0 +1,40 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix5x4F : IEquatable> where T : IFloatingPointIeee754 + { + public Vector4F Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4F Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public Vector4F Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public T M34 => Row3.W; + public Vector4F Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public T M43 => Row4.Z; + public T M44 => Row4.W; + public Vector4F Row5; + public T M51 => Row5.X; + public T M52 => Row5.Y; + public T M53 => Row5.Z; + public T M54 => Row5.W; + public static bool operator ==(Matrix5x4F left, Matrix5x4F right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4 && left.Row5 == right.Row5; + public static bool operator !=(Matrix5x4F left, Matrix5x4F right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix5x4F other && Equals(other); + /// + public bool Equals(Matrix5x4F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4, Row5); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Matrix5x4I.gen.cs b/sources/Maths/Maths/Matrix5x4I.gen.cs new file mode 100644 index 0000000000..5a072ef187 --- /dev/null +++ b/sources/Maths/Maths/Matrix5x4I.gen.cs @@ -0,0 +1,40 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Matrix5x4I : IEquatable> where T : IBinaryInteger + { + public Vector4I Row1; + public T M11 => Row1.X; + public T M12 => Row1.Y; + public T M13 => Row1.Z; + public T M14 => Row1.W; + public Vector4I Row2; + public T M21 => Row2.X; + public T M22 => Row2.Y; + public T M23 => Row2.Z; + public T M24 => Row2.W; + public Vector4I Row3; + public T M31 => Row3.X; + public T M32 => Row3.Y; + public T M33 => Row3.Z; + public T M34 => Row3.W; + public Vector4I Row4; + public T M41 => Row4.X; + public T M42 => Row4.Y; + public T M43 => Row4.Z; + public T M44 => Row4.W; + public Vector4I Row5; + public T M51 => Row5.X; + public T M52 => Row5.Y; + public T M53 => Row5.Z; + public T M54 => Row5.W; + public static bool operator ==(Matrix5x4I left, Matrix5x4I right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4 && left.Row5 == right.Row5; + public static bool operator !=(Matrix5x4I left, Matrix5x4I right) => !(left == right); + public override bool Equals(object? obj) => obj is Matrix5x4I other && Equals(other); + /// + public bool Equals(Matrix5x4I other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4, Row5); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Vector2F.cs b/sources/Maths/Maths/Vector2F.cs index 6f563ced9e..26d8c13047 100644 --- a/sources/Maths/Maths/Vector2F.cs +++ b/sources/Maths/Maths/Vector2F.cs @@ -23,7 +23,7 @@ internal struct Vector2F : IUtf8SpanParsable>, IParsable>, IFormattable - where T : IBinaryFloatingPointIeee754 + where T : IFloatingPointIeee754 { /// The X component of the vector. public T X; diff --git a/sources/Maths/Maths/Vector3F.gen.cs b/sources/Maths/Maths/Vector3F.gen.cs new file mode 100644 index 0000000000..e37480e2c7 --- /dev/null +++ b/sources/Maths/Maths/Vector3F.gen.cs @@ -0,0 +1,18 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Vector3F : IEquatable> where T : IFloatingPointIeee754 + { + public T X; + public T Y; + public T Z; + public static bool operator ==(Vector3F left, Vector3F right) => left.X == right.X && left.Y == right.Y && left.Z == right.Z; + public static bool operator !=(Vector3F left, Vector3F right) => !(left == right); + public override bool Equals(object? obj) => obj is Vector3F other && Equals(other); + /// + public bool Equals(Vector3F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(X, Y, Z); + } +} \ No newline at end of file diff --git a/sources/Maths/Maths/Vector4F.gen.cs b/sources/Maths/Maths/Vector4F.gen.cs new file mode 100644 index 0000000000..77defbefa4 --- /dev/null +++ b/sources/Maths/Maths/Vector4F.gen.cs @@ -0,0 +1,19 @@ +namespace Silk.NET.Maths +{ + using System.Numerics; + + partial struct Vector4F : IEquatable> where T : IFloatingPointIeee754 + { + public T X; + public T Y; + public T Z; + public T W; + public static bool operator ==(Vector4F left, Vector4F right) => left.X == right.X && left.Y == right.Y && left.Z == right.Z && left.W == right.W; + public static bool operator !=(Vector4F left, Vector4F right) => !(left == right); + public override bool Equals(object? obj) => obj is Vector4F other && Equals(other); + /// + public bool Equals(Vector4F other) => this == other; + /// + public override int GetHashCode() => HashCode.Combine(X, Y, Z, W); + } +} \ No newline at end of file