Ready to release v2.4.1 #89
11
Changelog.md
11
Changelog.md
@ -6,10 +6,21 @@ Here's the full changelog:
|
||||
```
|
||||
* Nerd_STF
|
||||
* Mathematics
|
||||
* Abstract
|
||||
* IMatrix
|
||||
+ Cofactor()
|
||||
* Algebra
|
||||
* Matrix
|
||||
= Fixed a blunder in `SignGrid(Int2)` with signs being incorrectly placed on matrixes with even column count.
|
||||
* Matrix2x2
|
||||
= Fixed a blunder in `Cofactor()` with the position of elements.
|
||||
* NumberSystems
|
||||
* Complex
|
||||
+ operator Complex(SystemComplex)
|
||||
+ operator SystemComplex(Complex)
|
||||
* Quaternion
|
||||
+ operator Quaternion(SystemQuaternion)
|
||||
+ operator SystemQuaternion(Quaternion)
|
||||
* Float3
|
||||
= Added a setter to `XY`
|
||||
= Added a setter to `XZ`
|
||||
|
||||
@ -6,6 +6,7 @@ public interface IMatrix<T> : IAbsolute<T>, ICeiling<T>, IClamp<T>, IDivide<T>,
|
||||
where T : IMatrix<T>
|
||||
{
|
||||
public T Adjugate();
|
||||
public T Cofactor();
|
||||
public float Determinant();
|
||||
public T? Inverse();
|
||||
public T Transpose();
|
||||
|
||||
@ -20,7 +20,12 @@ public class Matrix : IMatrix<Matrix, Matrix>
|
||||
return m;
|
||||
}
|
||||
public static Matrix One(Int2 size) => new(size, 1);
|
||||
public static Matrix SignGrid(Int2 size) => new(size, Fills.SignFill);
|
||||
public static Matrix SignGrid(Int2 size) => new(size, delegate (int x)
|
||||
{
|
||||
float sgnValue = Fills.SignFill(x);
|
||||
if (size.y % 2 == 0 && x / size.y % 2 == 1) sgnValue *= -1;
|
||||
return sgnValue;
|
||||
});
|
||||
public static Matrix Zero(Int2 size) => new(size);
|
||||
|
||||
public bool HasMinors => Size.x > 1 && Size.y > 1;
|
||||
|
||||
@ -223,8 +223,8 @@ public record class Matrix2x2 : IStaticMatrix<Matrix2x2>
|
||||
{
|
||||
Matrix2x2 swapped = new(new[,]
|
||||
{
|
||||
{ r2c2, r1c2 },
|
||||
{ r2c1, r1c1 }
|
||||
{ r2c2, r2c1 },
|
||||
{ r1c2, r1c1 }
|
||||
});
|
||||
return swapped ^ SignGrid;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user