mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-02 00:10:58 -05:00
readonly struct Byte4 and UShort4.
This commit is contained in:
parent
1e2166eb10
commit
ddcb5af0e3
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user