daily update on 20230927 by nitload youmu, all polygon4 display available, optimizing on C/C# interoperation
This commit is contained in:
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
|
||||
[StructLayout(LayoutKind.Explicit,Size = 16,Pack = 16)]
|
||||
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
|
||||
public struct Vec3d
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
@@ -22,7 +22,12 @@ namespace StgSharp.Math
|
||||
X = x; Y = y; Z = z;
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal Vec3d(Vector4 vector)
|
||||
{
|
||||
vec = vector;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3d operator +(Vec3d vec1, Vec3d vec2)
|
||||
{
|
||||
@@ -57,9 +62,9 @@ namespace StgSharp.Math
|
||||
public static Vec3d operator /(Vec3d vec, float value)
|
||||
{
|
||||
return new Vec3d(
|
||||
vec.X/value,
|
||||
vec.Y/value,
|
||||
vec.Z/value
|
||||
vec.X / value,
|
||||
vec.Y / value,
|
||||
vec.Z / value
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user