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

Update Raylib.Utils.cs

This commit is contained in:
Alexander Baggett 2024-09-10 19:19:48 -05:00 committed by GitHub
commit e8b8f20edf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -425,8 +425,10 @@ public static unsafe partial class Raylib
public static CBool CheckCollisionPointPoly(Vector2 point, Vector2[] points) public static CBool CheckCollisionPointPoly(Vector2 point, Vector2[] points)
{ {
var pointsPtr = (Vector2*)Unsafe.AsPointer<Vector2>(ref MemoryMarshal.GetArrayDataReference(points)); fixed (Vector2* pointsPtr = &MemoryMarshal.GetArrayDataReference(points))
return CheckCollisionPointPoly(point, pointsPtr, points.Length); {
return CheckCollisionPointPoly(point, pointsPtr, points.Length);
}
} }
/// <summary>Generate image: grayscale image from text data</summary> /// <summary>Generate image: grayscale image from text data</summary>