Update structure types to record structs (#326)
This commit is contained in:
parent
7db9848fb2
commit
a31a4eb3ca
7 changed files with 8 additions and 18 deletions
|
|
@ -7,7 +7,7 @@ namespace Raylib_cs;
|
|||
/// Rectangle type
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Rectangle
|
||||
public record struct Rectangle
|
||||
{
|
||||
public float X;
|
||||
public float Y;
|
||||
|
|
@ -106,9 +106,4 @@ public struct Rectangle
|
|||
Width -= shrink * 2.0f;
|
||||
Height -= shrink * 2.0f;
|
||||
}
|
||||
|
||||
public readonly override string ToString()
|
||||
{
|
||||
return $"{{X:{X} Y:{Y} Width:{Width} Height:{Height}}}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue