Skip to content

Fix copy-pase typos in Silk.NET.Math that were discovered during the exploration for Math 3.0. #2469

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 3 commits into from
Jul 21, 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
4 changes: 2 additions & 2 deletions src/Maths/Silk.NET.Maths/Cube.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public bool Contains(Cube<T> other)
return Scalar.GreaterThanOrEqual(other.Origin.X, this.Origin.X) && Scalar.GreaterThanOrEqual
(other.Origin.Y, this.Origin.Y) && Scalar.GreaterThanOrEqual
(other.Origin.Z, this.Origin.Z) && Scalar.LessThanOrEqual(oMax.X, tMax.X) && Scalar.LessThanOrEqual
(oMax.Y, tMax.Y) && Scalar.GreaterThanOrEqual(oMax.Y, tMax.Y);
(oMax.Y, tMax.Y) && Scalar.LessThanOrEqual(oMax.Y, tMax.Y);
}

/// <summary>
Expand Down Expand Up @@ -240,4 +240,4 @@ public Cube<TOther> As<TOther>() where TOther : unmanaged, IFormattable, IEquata
return new(Origin.As<TOther>(), Max.As<TOther>());
}
}
}
}
9 changes: 5 additions & 4 deletions src/Maths/Silk.NET.Maths/Matrix2X2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public struct Matrix2X2<T> : IEquatable<Matrix2X2<T>>
/// </summary>
[IgnoreDataMember]
public Vector2D<T> Row1;

/// <summary>
/// Row 2 of the matrix.
/// </summary>
Expand All @@ -40,7 +41,6 @@ public struct Matrix2X2<T> : IEquatable<Matrix2X2<T>>
[IgnoreDataMember]
public Vector2D<T> Column2 => new(M12, M22);


/// <summary>Value at row 1, column 1 of the matrix.</summary>
[DataMember]
public T M11
Expand Down Expand Up @@ -130,8 +130,8 @@ public Matrix2X2(Matrix3X2<T> value)
Row2 = new(value.M21, value.M22);
}

/// <summary>Constructs a <see cref="Matrix2X2{T}"/> from the given Matrix4x3.</summary>
/// <param name="value">The source Matrix4x3.</param>
/// <summary>Constructs a <see cref="Matrix2X2{T}"/> from the given <see cref="Matrix4X3{T}"/>.</summary>
/// <param name="value">The source <see cref="Matrix4X3{T}"/>.</param>
public Matrix2X2(Matrix4X3<T> value)
{
Row1 = new(value.M11, value.M12);
Expand Down Expand Up @@ -166,6 +166,7 @@ public Matrix2X2(Matrix4X2<T> value)
public static Matrix2X2<T> Identity => _identity;

/// <summary>Returns whether the matrix is the identity matrix.</summary>
[IgnoreDataMember]
public readonly bool IsIdentity
=> Scalar.Equal(M11, Scalar<T>.One) &&
Scalar.Equal(M22, Scalar<T>.One) && // Check diagonal element first for early out.
Expand Down Expand Up @@ -225,7 +226,7 @@ public readonly bool IsIdentity
/// <returns>The result of the multiplication.</returns>
public static unsafe Vector2D<T> operator *(Vector2D<T> value1, Matrix2X2<T> value2)
{
return value1 * value2.Row1 + value1 * value2.Row2;
return value1.X * value2.Row1 + value1.Y * value2.Row2;
}

/// <summary>Multiplies a matrix by a scalar value.</summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Maths/Silk.NET.Maths/Matrix2X3.Ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static Matrix2X3<T> Subtract<T>(Matrix2X3<T> value1, Matrix2X3<T> value2)
public static unsafe Matrix2X3<T> Lerp<T>(Matrix2X3<T> matrix1, Matrix2X3<T> matrix2, T amount)
where T : unmanaged, IFormattable, IEquatable<T>, IComparable<T>
{
return new(Vector3D.Lerp(matrix1.Row1, matrix2.Row2, amount), Vector3D.Lerp(matrix1.Row2, matrix2.Row2, amount));
return new(Vector3D.Lerp(matrix1.Row1, matrix2.Row1, amount), Vector3D.Lerp(matrix1.Row2, matrix2.Row2, amount));
}

/// <summary>Transforms the given matrix by applying the given Quaternion rotation.</summary>
Expand Down Expand Up @@ -260,4 +260,4 @@ public static Matrix2X3<T> Transform<T>(Matrix2X3<T> value, Quaternion<T> rotati
return new(value.M11 * q1 + value.M12 * q2 + value.M13 * q3, value.M21 * q1 + value.M22 * q2 + value.M23 * q3);
}
}
}
}
4 changes: 2 additions & 2 deletions src/Maths/Silk.NET.Maths/Matrix2X3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public T M13
[DataMember]
public T M21
{
readonly get => Row1.X;
set => Row1.X = value;
readonly get => Row2.X;
set => Row2.X = value;
}

/// <summary>Value at row 2, column 2 of the matrix.</summary>
Expand Down
8 changes: 4 additions & 4 deletions src/Maths/Silk.NET.Maths/Matrix2X4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void VerifyBounds(int i)
}

/// <summary>
/// Constructs a <see cref="Matrix2X4{T}"/> from the given rows
/// Constructs a <see cref="Matrix2X4{T}"/> from the given rows.
/// </summary>
public Matrix2X4(Vector4D<T> row1, Vector4D<T> row2)
{
Expand All @@ -179,8 +179,8 @@ public Matrix2X4(Matrix3X2<T> value)
Row2 = new(value.M21, value.M22, default, default);
}

/// <summary>Constructs a <see cref="Matrix2X4{T}"/> from the given Matrix4x3.</summary>
/// <param name="value">The source Matrix4x3.</param>
/// <summary>Constructs a <see cref="Matrix2X4{T}"/> from the given <see cref="Matrix4X3{T}"/>.</summary>
/// <param name="value">The source <see cref="Matrix4X3{T}"/>.</param>
public Matrix2X4(Matrix4X3<T> value)
{
Row1 = new(value.M11, value.M12, value.M13, default);
Expand All @@ -203,7 +203,7 @@ public Matrix2X4(Matrix3X3<T> value)
Row2 = new(value.M21, value.M22, value.M23, default);
}

/// <summary>Constructs a Matrix2x4 from the given <see cref="Matrix4X2{T}"/>.</summary>
/// <summary>Constructs a <see cref="Matrix2X4{T}"/> from the given <see cref="Matrix4X2{T}"/>.</summary>
/// <param name="value">The source <see cref="Matrix4X2{T}"/>.</param>
public Matrix2X4(Matrix4X2<T> value)
{
Expand Down
11 changes: 10 additions & 1 deletion src/Maths/Silk.NET.Maths/Matrix3X2.Ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,15 @@ public static Matrix2X3<T> Multiply<T>(Matrix2X3<T> value1, Matrix3X3<T> value2)
where T : unmanaged, IFormattable, IEquatable<T>, IComparable<T>
=> value1 * value2;

/// <summary>Multiplies two matrices together and returns the resulting matrix.</summary>
/// <param name="value1">The first source matrix.</param>
/// <param name="value2">The second source matrix.</param>
/// <returns>The product matrix.</returns>
[MethodImpl((MethodImplOptions) 768)]
public static Matrix3X2<T> Multiply<T>(Matrix3X3<T> value1, Matrix3X2<T> value2)
where T : unmanaged, IFormattable, IEquatable<T>, IComparable<T>
=> value1 * value2;

/// <summary>Scales all elements in a matrix by the given scalar factor.</summary>
/// <param name="value1">The source matrix.</param>
/// <param name="value2">The scaling value to use.</param>
Expand All @@ -497,4 +506,4 @@ public static Matrix3X2<T> Subtract<T>(Matrix3X2<T> value1, Matrix3X2<T> value2)
where T : unmanaged, IFormattable, IEquatable<T>, IComparable<T>
=> value1 - value2;
}
}
}
16 changes: 8 additions & 8 deletions src/Maths/Silk.NET.Maths/Matrix3X2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,47 +51,47 @@ public struct Matrix3X2<T>
[IgnoreDataMember]
public Vector3D<T> Column2 => new(Row1.Y, Row2.Y, Row3.Y);

/// <summary>The first element of the first row</summary>
/// <summary>Value at row 1, column 1 of the matrix.</summary>
[DataMember]
public T M11
{
readonly get => Row1.X;
set => Row1.X = value;
}

/// <summary>The second element of the first row</summary>
/// <summary>Value at row 1, column 2 of the matrix.</summary>
[DataMember]
public T M12
{
readonly get => Row1.Y;
set => Row1.Y = value;
}

/// <summary>The first element of the second row</summary>
/// <summary>Value at row 2, column 1 of the matrix.</summary>
[DataMember]
public T M21
{
readonly get => Row2.X;
set => Row2.X = value;
}

/// <summary>The second element of the second row</summary>
/// <summary>Value at row 2, column 2 of the matrix.</summary>
[DataMember]
public T M22
{
readonly get => Row2.Y;
set => Row2.Y = value;
}

/// <summary>The first element of the third row</summary>
/// <summary>Value at row 3, column 1 of the matrix.</summary>
[DataMember]
public T M31
{
readonly get => Row3.X;
set => Row3.X = value;
}

/// <summary>The second element of the third row</summary>
/// <summary>Value at row 3, column 2 of the matrix.</summary>
[DataMember]
public T M32
{
Expand Down Expand Up @@ -154,8 +154,8 @@ public Matrix3X2(Vector2D<T> row1, Vector2D<T> row2, Vector2D<T> row3)
Row3 = row3;
}

/// <summary>Constructs a <see cref="Matrix3X2{T}"/> from the given Matrix4x3.</summary>
/// <param name="value">The source Matrix4x3.</param>
/// <summary>Constructs a <see cref="Matrix3X2{T}"/> from the given <see cref="Matrix4X3{T}"/>.</summary>
/// <param name="value">The source <see cref="Matrix4X3{T}"/>.</param>
public Matrix3X2(Matrix4X3<T> value)
{
Row1 = new(value.M11, value.M12);
Expand Down
2 changes: 0 additions & 2 deletions src/Maths/Silk.NET.Maths/Matrix3X3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ public struct Matrix3X3<T> : IEquatable<Matrix3X3<T>>
[IgnoreDataMember]
public Vector3D<T> Column1 => new(Row1.X, Row2.X, Row3.X);


/// <summary>
/// Column 2 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector3D<T> Column2 => new(Row1.Y, Row2.Y, Row3.Y);


/// <summary>
/// Column 3 of the matrix.
/// </summary>
Expand Down
7 changes: 1 addition & 6 deletions src/Maths/Silk.NET.Maths/Matrix3X4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,7 @@ static void VerifyBounds(int i)
}
}

/// <summary>
/// Constructs a <see cref="Matrix3X4{T}"/> from the given rows.
/// </summary>
/// <param name="row1"></param>
/// <param name="row2"></param>
/// <param name="row3"></param>
/// <summary>Constructs a <see cref="Matrix3X4{T}"/> from the given rows.</summary>
public Matrix3X4(Vector4D<T> row1, Vector4D<T> row2, Vector4D<T> row3)
{
Row1 = row1;
Expand Down
10 changes: 4 additions & 6 deletions src/Maths/Silk.NET.Maths/Matrix4X2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,23 @@ public struct Matrix4X2<T> : IEquatable<Matrix4X2<T>>
public Vector2D<T> Row1;

/// <summary>
/// Row 2 of the matrix
/// Row 2 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector2D<T> Row2;

/// <summary>
/// Row 3 of the matrix
/// Row 3 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector2D<T> Row3;

/// <summary>
/// Row 4 of the matrix
/// Row 4 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector2D<T> Row4;



/// <summary>
/// Column 1 of the matrix.
/// </summary>
Expand All @@ -59,7 +57,7 @@ public struct Matrix4X2<T> : IEquatable<Matrix4X2<T>>
/// Column 2 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector4D<T> Column2 => new(Row1.Y, Row2.Y, Row3.X, Row4.X);
public Vector4D<T> Column2 => new(Row1.Y, Row2.Y, Row3.Y, Row4.Y);

/// <summary>Value at row 1, column 1 of the matrix.</summary>
[DataMember]
Expand Down
6 changes: 3 additions & 3 deletions src/Maths/Silk.NET.Maths/Matrix4X3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ public struct Matrix4X3<T> : IEquatable<Matrix4X3<T>>
public Vector3D<T> Row1;

/// <summary>
/// Row 1 of the matrix.
/// Row 2 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector3D<T> Row2;

/// <summary>
/// Row 1 of the matrix.
/// Row 3 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector3D<T> Row3;

/// <summary>
/// Row 1 of the matrix.
/// Row 4 of the matrix.
/// </summary>
[IgnoreDataMember]
public Vector3D<T> Row4;
Expand Down
2 changes: 1 addition & 1 deletion src/Maths/Silk.NET.Maths/Matrix4X4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void VerifyBounds(int i)
}

/// <summary>
/// Constructs a <see cref="Matrix4X4{T}"/> from the given rows
/// Constructs a <see cref="Matrix4X4{T}"/> from the given rows.
/// </summary>
public Matrix4X4(Vector4D<T> row1, Vector4D<T> row2, Vector4D<T> row3, Vector4D<T> row4)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Maths/Silk.NET.Maths/Matrix5X4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Silk.NET.Maths
{
/// <summary>A structure encapsulating a 4x4 matrix.</summary>
/// <summary>A structure encapsulating a 5x4 matrix.</summary>
[Serializable]
[DataContract]
public struct Matrix5X4<T> : IEquatable<Matrix5X4<T>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static Silk.NET.Maths.Matrix3X2.Invert<T>(Silk.NET.Maths.Matrix3X2<T> matrix, ou
static Silk.NET.Maths.Matrix3X2.Lerp<T>(Silk.NET.Maths.Matrix3X2<T> matrix1, Silk.NET.Maths.Matrix3X2<T> matrix2, T amount) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix2X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X3<T> value2) -> Silk.NET.Maths.Matrix2X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X3<T> value2) -> Silk.NET.Maths.Matrix3X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, T value2) -> Silk.NET.Maths.Matrix3X2<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static Silk.NET.Maths.Matrix3X2.Invert<T>(Silk.NET.Maths.Matrix3X2<T> matrix, ou
static Silk.NET.Maths.Matrix3X2.Lerp<T>(Silk.NET.Maths.Matrix3X2<T> matrix1, Silk.NET.Maths.Matrix3X2<T> matrix2, T amount) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix2X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X3<T> value2) -> Silk.NET.Maths.Matrix2X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X3<T> value2) -> Silk.NET.Maths.Matrix3X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, T value2) -> Silk.NET.Maths.Matrix3X2<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static Silk.NET.Maths.Matrix3X2.Invert<T>(Silk.NET.Maths.Matrix3X2<T> matrix, ou
static Silk.NET.Maths.Matrix3X2.Lerp<T>(Silk.NET.Maths.Matrix3X2<T> matrix1, Silk.NET.Maths.Matrix3X2<T> matrix2, T amount) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix2X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X3<T> value2) -> Silk.NET.Maths.Matrix2X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X3<T> value2) -> Silk.NET.Maths.Matrix3X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, T value2) -> Silk.NET.Maths.Matrix3X2<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static Silk.NET.Maths.Matrix3X2.Invert<T>(Silk.NET.Maths.Matrix3X2<T> matrix, ou
static Silk.NET.Maths.Matrix3X2.Lerp<T>(Silk.NET.Maths.Matrix3X2<T> matrix1, Silk.NET.Maths.Matrix3X2<T> matrix2, T amount) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix2X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X3<T> value2) -> Silk.NET.Maths.Matrix2X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X3<T> value2) -> Silk.NET.Maths.Matrix3X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, T value2) -> Silk.NET.Maths.Matrix3X2<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static Silk.NET.Maths.Matrix3X2.Invert<T>(Silk.NET.Maths.Matrix3X2<T> matrix, ou
static Silk.NET.Maths.Matrix3X2.Lerp<T>(Silk.NET.Maths.Matrix3X2<T> matrix1, Silk.NET.Maths.Matrix3X2<T> matrix2, T amount) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix2X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X3<T> value2) -> Silk.NET.Maths.Matrix2X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X3<T> value2) -> Silk.NET.Maths.Matrix3X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, T value2) -> Silk.NET.Maths.Matrix3X2<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static Silk.NET.Maths.Matrix3X2.Invert<T>(Silk.NET.Maths.Matrix3X2<T> matrix, ou
static Silk.NET.Maths.Matrix3X2.Lerp<T>(Silk.NET.Maths.Matrix3X2<T> matrix1, Silk.NET.Maths.Matrix3X2<T> matrix2, T amount) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix2X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix2X3<T> value1, Silk.NET.Maths.Matrix3X3<T> value2) -> Silk.NET.Maths.Matrix2X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X3<T> value1, Silk.NET.Maths.Matrix3X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X2<T> value2) -> Silk.NET.Maths.Matrix3X2<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, Silk.NET.Maths.Matrix2X3<T> value2) -> Silk.NET.Maths.Matrix3X3<T>
static Silk.NET.Maths.Matrix3X2.Multiply<T>(Silk.NET.Maths.Matrix3X2<T> value1, T value2) -> Silk.NET.Maths.Matrix3X2<T>
Expand Down
4 changes: 2 additions & 2 deletions src/Maths/Silk.NET.Maths/Sphere.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Sphere(T centerX, T centerY, T centerZ, T radius)
/// <remarks>This does consider a point on the edge contained.</remarks>
public bool Contains(Vector3D<T> point)
{
return Scalar.LessThanOrEqual(Vector3D.DistanceSquared(point, Center), Radius);
return Scalar.LessThanOrEqual(Vector3D.DistanceSquared(point, Center), SquaredRadius);
}

/// <summary>
Expand Down Expand Up @@ -173,4 +173,4 @@ public Sphere<TOther> As<TOther>() where TOther : unmanaged, IFormattable, IEqua
return new(Center.As<TOther>(), Scalar.As<T, TOther>(Radius));
}
}
}
}
Loading