Daily update on 20230803 by nitload youmu, problem of parameter displacement solved, rewriting other linear math
This commit is contained in:
+12
-38
@@ -1,5 +1,6 @@
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Runtime.Intrinsics;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
@@ -8,48 +9,21 @@ namespace StgSharp
|
||||
{
|
||||
private unsafe static void Main(string[] args)
|
||||
{
|
||||
/*
|
||||
Matrix4x4 matrix = new Matrix4x4(
|
||||
0,0,0,0,
|
||||
1,2,3,4,
|
||||
0,0,0,0,
|
||||
0,0,0,0
|
||||
);
|
||||
Vec3d v = new Vec3d(1,2,3);
|
||||
Console.WriteLine(v._m128Ptr);
|
||||
Console.WriteLine(v);
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine((long)matrix._row0Ptr/16.0);
|
||||
Console.WriteLine((long)matrix._row1Ptr/16.0);
|
||||
Console.WriteLine((long)matrix._row2Ptr/16.0);
|
||||
Console.WriteLine((long)matrix._row3Ptr/16.0);
|
||||
Vec3d v2 = new Vec3d(2,2,3);
|
||||
Console.WriteLine(v2._m128Ptr);
|
||||
Console.WriteLine(v2);
|
||||
Console.WriteLine();
|
||||
|
||||
Matrix4x4 matrix2 = new Matrix4x4(
|
||||
0, 0, 0, 0,
|
||||
1, 2, 3, 4,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
);
|
||||
Vec3d v3 = v - v2;
|
||||
|
||||
Console.WriteLine((long)matrix2._row0Ptr / 16.0);
|
||||
Console.WriteLine((long)matrix2._row1Ptr / 16.0);
|
||||
Console.WriteLine((long)matrix2._row2Ptr / 16.0);
|
||||
Console.WriteLine((long)matrix2._row3Ptr / 16.0);
|
||||
|
||||
Console.WriteLine(matrix+matrix2);
|
||||
/**/
|
||||
Vec4d vec = new Vec4d(1,2,2,3);
|
||||
|
||||
IntPtr ptr1 = internalIO.InternalInitM128(1,2,3,4);
|
||||
IntPtr ptr2 = internalIO.InternalInitM128(2,2,3,3);
|
||||
|
||||
Console.WriteLine(ptr1);
|
||||
Console.WriteLine(ptr2);
|
||||
|
||||
|
||||
IntPtr ret = internalIO.InternalInitM128(0,0,0,0);
|
||||
|
||||
internalIO.VecAddVec(ptr1,ptr2,ret);
|
||||
|
||||
Console.WriteLine(*(M128*)ret);
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine(v3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user