From 66ecc58354a42d8a516337257ab42eec90e9f428 Mon Sep 17 00:00:00 2001 From: Alexander Baggett Date: Wed, 4 Sep 2024 10:13:55 -0500 Subject: [PATCH] Update Raylib.Utils.cs --- Raylib-cs/types/Raylib.Utils.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs index b67c732..2760042 100644 --- a/Raylib-cs/types/Raylib.Utils.cs +++ b/Raylib-cs/types/Raylib.Utils.cs @@ -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(ref MemoryMarshal.GetArrayDataReference(points)); + return CheckCollisionPointPoly(point, pointsPtr, points.Length); + } + /// Generate image: grayscale image from text data public static Image GenImageText(int width, int height, string text) {