Skip to content

Include generated code. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sources/Maths/Maths/Matrix2x2F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix2x2F<T> : IEquatable<Matrix2x2F<T>> where T : IFloatingPointIeee754<T>
{
public Vector2F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public Vector2F<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public static bool operator ==(Matrix2x2F<T> left, Matrix2x2F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2;
public static bool operator !=(Matrix2x2F<T> left, Matrix2x2F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix2x2F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix2x2F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2);
}
}
21 changes: 21 additions & 0 deletions sources/Maths/Maths/Matrix2x2I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix2x2I<T> : IEquatable<Matrix2x2I<T>> where T : IBinaryInteger<T>
{
public Vector2I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public Vector2I<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public static bool operator ==(Matrix2x2I<T> left, Matrix2x2I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2;
public static bool operator !=(Matrix2x2I<T> left, Matrix2x2I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix2x2I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix2x2I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2);
}
}
23 changes: 23 additions & 0 deletions sources/Maths/Maths/Matrix2x3F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix2x3F<T> : IEquatable<Matrix2x3F<T>> where T : IFloatingPointIeee754<T>
{
public Vector3F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public Vector3F<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public T M23 => Row2.Z;
public static bool operator ==(Matrix2x3F<T> left, Matrix2x3F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2;
public static bool operator !=(Matrix2x3F<T> left, Matrix2x3F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix2x3F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix2x3F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2);
}
}
23 changes: 23 additions & 0 deletions sources/Maths/Maths/Matrix2x3I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix2x3I<T> : IEquatable<Matrix2x3I<T>> where T : IBinaryInteger<T>
{
public Vector3I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public Vector3I<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public T M23 => Row2.Z;
public static bool operator ==(Matrix2x3I<T> left, Matrix2x3I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2;
public static bool operator !=(Matrix2x3I<T> left, Matrix2x3I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix2x3I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix2x3I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2);
}
}
25 changes: 25 additions & 0 deletions sources/Maths/Maths/Matrix2x4F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix2x4F<T> : IEquatable<Matrix2x4F<T>> where T : IFloatingPointIeee754<T>
{
public Vector4F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public T M14 => Row1.W;
public Vector4F<T> 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<T> left, Matrix2x4F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2;
public static bool operator !=(Matrix2x4F<T> left, Matrix2x4F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix2x4F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix2x4F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2);
}
}
25 changes: 25 additions & 0 deletions sources/Maths/Maths/Matrix2x4I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix2x4I<T> : IEquatable<Matrix2x4I<T>> where T : IBinaryInteger<T>
{
public Vector4I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public T M14 => Row1.W;
public Vector4I<T> 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<T> left, Matrix2x4I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2;
public static bool operator !=(Matrix2x4I<T> left, Matrix2x4I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix2x4I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix2x4I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2);
}
}
24 changes: 24 additions & 0 deletions sources/Maths/Maths/Matrix3x2F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix3x2F<T> : IEquatable<Matrix3x2F<T>> where T : IFloatingPointIeee754<T>
{
public Vector2F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public Vector2F<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public Vector2F<T> Row3;
public T M31 => Row3.X;
public T M32 => Row3.Y;
public static bool operator ==(Matrix3x2F<T> left, Matrix3x2F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3;
public static bool operator !=(Matrix3x2F<T> left, Matrix3x2F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix3x2F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix3x2F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3);
}
}
24 changes: 24 additions & 0 deletions sources/Maths/Maths/Matrix3x2I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix3x2I<T> : IEquatable<Matrix3x2I<T>> where T : IBinaryInteger<T>
{
public Vector2I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public Vector2I<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public Vector2I<T> Row3;
public T M31 => Row3.X;
public T M32 => Row3.Y;
public static bool operator ==(Matrix3x2I<T> left, Matrix3x2I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3;
public static bool operator !=(Matrix3x2I<T> left, Matrix3x2I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix3x2I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix3x2I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3);
}
}
27 changes: 27 additions & 0 deletions sources/Maths/Maths/Matrix3x3F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix3x3F<T> : IEquatable<Matrix3x3F<T>> where T : IFloatingPointIeee754<T>
{
public Vector3F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public Vector3F<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public T M23 => Row2.Z;
public Vector3F<T> Row3;
public T M31 => Row3.X;
public T M32 => Row3.Y;
public T M33 => Row3.Z;
public static bool operator ==(Matrix3x3F<T> left, Matrix3x3F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3;
public static bool operator !=(Matrix3x3F<T> left, Matrix3x3F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix3x3F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix3x3F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3);
}
}
27 changes: 27 additions & 0 deletions sources/Maths/Maths/Matrix3x3I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix3x3I<T> : IEquatable<Matrix3x3I<T>> where T : IBinaryInteger<T>
{
public Vector3I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public Vector3I<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public T M23 => Row2.Z;
public Vector3I<T> Row3;
public T M31 => Row3.X;
public T M32 => Row3.Y;
public T M33 => Row3.Z;
public static bool operator ==(Matrix3x3I<T> left, Matrix3x3I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3;
public static bool operator !=(Matrix3x3I<T> left, Matrix3x3I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix3x3I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix3x3I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3);
}
}
30 changes: 30 additions & 0 deletions sources/Maths/Maths/Matrix3x4F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix3x4F<T> : IEquatable<Matrix3x4F<T>> where T : IFloatingPointIeee754<T>
{
public Vector4F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public T M14 => Row1.W;
public Vector4F<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public T M23 => Row2.Z;
public T M24 => Row2.W;
public Vector4F<T> 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<T> left, Matrix3x4F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3;
public static bool operator !=(Matrix3x4F<T> left, Matrix3x4F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix3x4F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix3x4F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3);
}
}
30 changes: 30 additions & 0 deletions sources/Maths/Maths/Matrix3x4I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix3x4I<T> : IEquatable<Matrix3x4I<T>> where T : IBinaryInteger<T>
{
public Vector4I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public T M13 => Row1.Z;
public T M14 => Row1.W;
public Vector4I<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public T M23 => Row2.Z;
public T M24 => Row2.W;
public Vector4I<T> 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<T> left, Matrix3x4I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3;
public static bool operator !=(Matrix3x4I<T> left, Matrix3x4I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix3x4I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix3x4I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3);
}
}
27 changes: 27 additions & 0 deletions sources/Maths/Maths/Matrix4x2F.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix4x2F<T> : IEquatable<Matrix4x2F<T>> where T : IFloatingPointIeee754<T>
{
public Vector2F<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public Vector2F<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public Vector2F<T> Row3;
public T M31 => Row3.X;
public T M32 => Row3.Y;
public Vector2F<T> Row4;
public T M41 => Row4.X;
public T M42 => Row4.Y;
public static bool operator ==(Matrix4x2F<T> left, Matrix4x2F<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4;
public static bool operator !=(Matrix4x2F<T> left, Matrix4x2F<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix4x2F<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix4x2F<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4);
}
}
27 changes: 27 additions & 0 deletions sources/Maths/Maths/Matrix4x2I.gen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace Silk.NET.Maths
{
using System.Numerics;

partial struct Matrix4x2I<T> : IEquatable<Matrix4x2I<T>> where T : IBinaryInteger<T>
{
public Vector2I<T> Row1;
public T M11 => Row1.X;
public T M12 => Row1.Y;
public Vector2I<T> Row2;
public T M21 => Row2.X;
public T M22 => Row2.Y;
public Vector2I<T> Row3;
public T M31 => Row3.X;
public T M32 => Row3.Y;
public Vector2I<T> Row4;
public T M41 => Row4.X;
public T M42 => Row4.Y;
public static bool operator ==(Matrix4x2I<T> left, Matrix4x2I<T> right) => left.Row1 == right.Row1 && left.Row2 == right.Row2 && left.Row3 == right.Row3 && left.Row4 == right.Row4;
public static bool operator !=(Matrix4x2I<T> left, Matrix4x2I<T> right) => !(left == right);
public override bool Equals(object? obj) => obj is Matrix4x2I<T> other && Equals(other);
/// <inheridoc/>
public bool Equals(Matrix4x2I<T> other) => this == other;
/// <inheridoc/>
public override int GetHashCode() => HashCode.Combine(Row1, Row2, Row3, Row4);
}
}
Loading