From 5fc01618b277a3759fbe3138c38aaa404fd78b55 Mon Sep 17 00:00:00 2001
From: JupiterRider <60042618+JupiterRider@users.noreply.github.com>
Date: Fri, 6 Dec 2024 22:08:33 +0100
Subject: [PATCH] Vector2Refract added
---
Raylib-cs/interop/Raymath.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Raylib-cs/interop/Raymath.cs b/Raylib-cs/interop/Raymath.cs
index eca6671..318ccd2 100644
--- a/Raylib-cs/interop/Raymath.cs
+++ b/Raylib-cs/interop/Raymath.cs
@@ -170,6 +170,15 @@ public static unsafe partial class Raymath
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Vector2Equals(Vector2 p, Vector2 q);
+ /// Compute the direction of a refracted ray
+ /// normalized direction of the incoming ray
+ /// normalized normal vector of the interface of two optical media
+ ///
+ /// ratio of the refractive index of the medium from where the ray comes
+ /// to the refractive index of the medium on the other side of the surface
+ ///
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Vector2 Vector2Refract(Vector2 v, Vector2 n, float r);
/// Vector with components value 0.0f
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]