Update Raylib.cs
This commit is contained in:
parent
db834c7d8a
commit
b018ab7d5b
1 changed files with 2 additions and 2 deletions
|
|
@ -1291,10 +1291,10 @@ public static unsafe partial class Raylib
|
||||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern CBool CheckCollisionPointPoly(Vector2 point, Vector2* points, int pointCount);
|
public static extern CBool CheckCollisionPointPoly(Vector2 point, Vector2* points, int pointCount);
|
||||||
|
|
||||||
public unsafe static bool CheckCollisionPointPoly(Vector2 point, Vector2[] points, int pointCount)
|
public static bool CheckCollisionPointPoly(Vector2 point, Vector2[] points)
|
||||||
{
|
{
|
||||||
var pointsPtr = (Vector2*)Unsafe.AsPointer<Vector2>(ref MemoryMarshal.GetArrayDataReference(points));
|
var pointsPtr = (Vector2*)Unsafe.AsPointer<Vector2>(ref MemoryMarshal.GetArrayDataReference(points));
|
||||||
return CheckCollisionPointPoly(point, pointsPtr, pointCount);
|
return CheckCollisionPointPoly(point, pointsPtr, points.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue