Watch
2
0
Fork
You've already forked raylib-cs
0

Update structure types to record structs (#326)

This commit is contained in:
Samuel Gido 2026-02-17 15:09:17 -06:00 committed by GitHub
commit a31a4eb3ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 8 additions and 18 deletions

View file

@ -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}}}";
}
}