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

Update Raylib.Utils.cs

This commit is contained in:
Alexander Baggett 2024-09-04 10:13:55 -05:00 committed by GitHub
commit 66ecc58354
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,6 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Raylib_cs;
@ -422,6 +423,12 @@ public static unsafe partial class Raylib
}
}
public static CBool CheckCollisionPointPoly(Vector2 point, Vector2[] points)
{
var pointsPtr = (Vector2*)Unsafe.AsPointer<Vector2>(ref MemoryMarshal.GetArrayDataReference(points));
return CheckCollisionPointPoly(point, pointsPtr, points.Length);
}
/// <summary>Generate image: grayscale image from text data</summary>
public static Image GenImageText(int width, int height, string text)
{