mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 13:54:45 -05:00
readonly struct Byte4 and UShort4.
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
||||
namespace UniGLTF
|
||||
{
|
||||
[Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct Byte4
|
||||
public readonly struct Byte4 : IEquatable<Byte4>
|
||||
{
|
||||
public readonly byte x;
|
||||
public readonly byte y;
|
||||
@@ -17,5 +17,10 @@ namespace UniGLTF
|
||||
z = _z;
|
||||
w = _w;
|
||||
}
|
||||
|
||||
public bool Equals(Byte4 other)
|
||||
{
|
||||
return x == other.x && y == other.y && z == other.z && w == other.w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
||||
namespace UniGLTF
|
||||
{
|
||||
[Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct UShort4
|
||||
public readonly struct UShort4 : IEquatable<UShort4>
|
||||
{
|
||||
public readonly ushort x;
|
||||
public readonly ushort y;
|
||||
@@ -18,5 +18,10 @@ namespace UniGLTF
|
||||
z = _z;
|
||||
w = _w;
|
||||
}
|
||||
|
||||
public bool Equals(UShort4 other)
|
||||
{
|
||||
return x == other.x && y == other.y && z == other.z && w == other.w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user