mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-06-30 19:03:42 -04:00
Update to raylib 4.5 (#149)
* Update bindings to raylib 4.5 * Review naming, comments and formatting
This commit is contained in:
@ -37,7 +37,13 @@ namespace Raylib_cs
|
||||
|
||||
/// <summary>Remap input value within input range to output range</summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd);
|
||||
public static extern float Remap(
|
||||
float value,
|
||||
float inputStart,
|
||||
float inputEnd,
|
||||
float outputStart,
|
||||
float outputEnd
|
||||
);
|
||||
|
||||
/// <summary>Wrap input value from min to max</summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -91,10 +97,21 @@ namespace Raylib_cs
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2);
|
||||
|
||||
/// <summary>Calculate angle from two vectors</summary>
|
||||
/// <summary>
|
||||
/// Calculate angle between two vectors
|
||||
/// NOTE: Angle is calculated from origin point (0, 0)
|
||||
/// </summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float Vector2Angle(Vector2 v1, Vector2 v2);
|
||||
|
||||
/// <summary>
|
||||
/// Calculate angle defined by a two vectors line
|
||||
/// NOTE: Parameters need to be normalized
|
||||
/// Current implementation should be aligned with glm::angle
|
||||
/// </summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float Vector2LineAngle(Vector2 start, Vector2 end);
|
||||
|
||||
/// <summary>Scale vector (multiply by value)</summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector2 Vector2Scale(Vector2 v, float scale);
|
||||
@ -387,7 +404,14 @@ namespace Raylib_cs
|
||||
|
||||
/// <summary>Get perspective projection matrix</summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Matrix4x4 MatrixFrustum(double left, double right, double bottom, double top, double near, double far);
|
||||
public static extern Matrix4x4 MatrixFrustum(
|
||||
double left,
|
||||
double right,
|
||||
double bottom,
|
||||
double top,
|
||||
double near,
|
||||
double far
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get perspective projection matrix<br/>
|
||||
@ -398,7 +422,14 @@ namespace Raylib_cs
|
||||
|
||||
/// <summary>Get orthographic projection matrix</summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Matrix4x4 MatrixOrtho(double left, double right, double bottom, double top, double near, double far);
|
||||
public static extern Matrix4x4 MatrixOrtho(
|
||||
double left,
|
||||
double right,
|
||||
double bottom,
|
||||
double top,
|
||||
double near,
|
||||
double far
|
||||
);
|
||||
|
||||
/// <summary>Get camera look-at matrix (view matrix)</summary>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
Reference in New Issue
Block a user