daily update on 20241228 by nitload youmu, better dot in checking

This commit is contained in:
Nitload
2024-12-29 04:30:40 +08:00
parent 592ad55d57
commit 63c3cd17e2
45 changed files with 7193 additions and 4884 deletions
@@ -208,7 +208,6 @@ namespace StgSharp.Math
fixed( ColumnSet4* source = &mat, target = &transpose ) {
InternalIO.Intrinsic.transpose44( source, target );
}
isTransposed = true;
}
}
@@ -238,12 +237,27 @@ namespace StgSharp.Math
mat.mat.colum2 * value, mat.mat.colum3 * value );
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe Matrix42 Multiple(in Matrix42 right)
{
InternalTranspose();
Matrix42 ans = new Matrix42();
fixed (ColumnSet4* lptr = &transpose)
fixed (Vector4* rptr = &right.mat.colum0)
{
InternalIO.Intrinsic.dot_42(lptr,rptr, &ans.mat.colum0);
}
return ans;
}
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public static unsafe Matrix42 operator *(
Matrix44 left,
Matrix42 right )
{
left.InternalTranspose();
return new Matrix42(
Vector4.Dot( left.transpose.colum0, right.mat.colum0 ),
Vector4.Dot( left.transpose.colum0, right.mat.colum1 ),
@@ -280,6 +294,7 @@ namespace StgSharp.Math
Vector4.Dot( left.transpose.colum3, right.mat.colum2 ) );
}
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public static Matrix44 operator *( Matrix44 left, Matrix44 right )
{