Reviewed functions description

Replaced: Returns -> Get
This commit is contained in:
Ray 2021-06-10 17:43:58 +02:00
parent d3387c952a
commit b0dcdf688f
7 changed files with 80 additions and 80 deletions

View File

@ -2320,7 +2320,7 @@ void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
//rlDisableShader(); //rlDisableShader();
} }
// Returns a ray trace from mouse position // Get a ray trace from mouse position
Ray GetMouseRay(Vector2 mouse, Camera camera) Ray GetMouseRay(Vector2 mouse, Camera camera)
{ {
Ray ray = { 0 }; Ray ray = { 0 };
@ -2381,7 +2381,7 @@ Matrix GetCameraMatrix(Camera camera)
return MatrixLookAt(camera.position, camera.target, camera.up); return MatrixLookAt(camera.position, camera.target, camera.up);
} }
// Returns camera 2d transform matrix // Get camera 2d transform matrix
Matrix GetCameraMatrix2D(Camera2D camera) Matrix GetCameraMatrix2D(Camera2D camera)
{ {
Matrix matTransform = { 0 }; Matrix matTransform = { 0 };
@ -2409,7 +2409,7 @@ Matrix GetCameraMatrix2D(Camera2D camera)
return matTransform; return matTransform;
} }
// Returns the screen space position from a 3d world space position // Get the screen space position from a 3d world space position
Vector2 GetWorldToScreen(Vector3 position, Camera camera) Vector2 GetWorldToScreen(Vector3 position, Camera camera)
{ {
Vector2 screenPosition = GetWorldToScreenEx(position, camera, GetScreenWidth(), GetScreenHeight()); Vector2 screenPosition = GetWorldToScreenEx(position, camera, GetScreenWidth(), GetScreenHeight());
@ -2417,7 +2417,7 @@ Vector2 GetWorldToScreen(Vector3 position, Camera camera)
return screenPosition; return screenPosition;
} }
// Returns size position for a 3d world space position (useful for texture drawing) // Get size position for a 3d world space position (useful for texture drawing)
Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height) Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height)
{ {
// Calculate projection matrix (from perspective instead of frustum // Calculate projection matrix (from perspective instead of frustum
@ -2459,7 +2459,7 @@ Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int heigh
return screenPosition; return screenPosition;
} }
// Returns the screen space position for a 2d camera world space position // Get the screen space position for a 2d camera world space position
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera) Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera)
{ {
Matrix matCamera = GetCameraMatrix2D(camera); Matrix matCamera = GetCameraMatrix2D(camera);
@ -2468,7 +2468,7 @@ Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera)
return (Vector2){ transform.x, transform.y }; return (Vector2){ transform.x, transform.y };
} }
// Returns the world space position for a 2d camera screen space position // Get the world space position for a 2d camera screen space position
Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera) Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera)
{ {
Matrix invMatCamera = MatrixInvert(GetCameraMatrix2D(camera)); Matrix invMatCamera = MatrixInvert(GetCameraMatrix2D(camera));
@ -2486,7 +2486,7 @@ void SetTargetFPS(int fps)
TRACELOG(LOG_INFO, "TIMER: Target time per frame: %02.03f milliseconds", (float)CORE.Time.target*1000); TRACELOG(LOG_INFO, "TIMER: Target time per frame: %02.03f milliseconds", (float)CORE.Time.target*1000);
} }
// Returns current FPS // Get current FPS
// NOTE: We calculate an average framerate // NOTE: We calculate an average framerate
int GetFPS(void) int GetFPS(void)
{ {
@ -2513,7 +2513,7 @@ int GetFPS(void)
return (int)roundf(1.0f/average); return (int)roundf(1.0f/average);
} }
// Returns time in seconds for last frame drawn (delta time) // Get time in seconds for last frame drawn (delta time)
float GetFrameTime(void) float GetFrameTime(void)
{ {
return (float)CORE.Time.frame; return (float)CORE.Time.frame;
@ -2588,7 +2588,7 @@ void TakeScreenshot(const char *fileName)
TRACELOG(LOG_INFO, "SYSTEM: [%s] Screenshot taken successfully", path); TRACELOG(LOG_INFO, "SYSTEM: [%s] Screenshot taken successfully", path);
} }
// Returns a random value between min and max (both included) // Get a random value between min and max (both included)
int GetRandomValue(int min, int max) int GetRandomValue(int min, int max)
{ {
if (min > max) if (min > max)
@ -3357,7 +3357,7 @@ bool IsMouseButtonUp(int button)
return !IsMouseButtonDown(button); return !IsMouseButtonDown(button);
} }
// Returns mouse position X // Get mouse position X
int GetMouseX(void) int GetMouseX(void)
{ {
#if defined(PLATFORM_ANDROID) #if defined(PLATFORM_ANDROID)
@ -3367,7 +3367,7 @@ int GetMouseX(void)
#endif #endif
} }
// Returns mouse position Y // Get mouse position Y
int GetMouseY(void) int GetMouseY(void)
{ {
#if defined(PLATFORM_ANDROID) #if defined(PLATFORM_ANDROID)
@ -3377,7 +3377,7 @@ int GetMouseY(void)
#endif #endif
} }
// Returns mouse position XY // Get mouse position XY
Vector2 GetMousePosition(void) Vector2 GetMousePosition(void)
{ {
Vector2 position = { 0 }; Vector2 position = { 0 };
@ -3419,7 +3419,7 @@ void SetMouseScale(float scaleX, float scaleY)
CORE.Input.Mouse.scale = (Vector2){ scaleX, scaleY }; CORE.Input.Mouse.scale = (Vector2){ scaleX, scaleY };
} }
// Returns mouse wheel movement Y // Get mouse wheel movement Y
float GetMouseWheelMove(void) float GetMouseWheelMove(void)
{ {
#if defined(PLATFORM_ANDROID) #if defined(PLATFORM_ANDROID)
@ -3447,7 +3447,7 @@ void SetMouseCursor(int cursor)
#endif #endif
} }
// Returns touch position X for touch point 0 (relative to screen size) // Get touch position X for touch point 0 (relative to screen size)
int GetTouchX(void) int GetTouchX(void)
{ {
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP) #if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP)
@ -3457,7 +3457,7 @@ int GetTouchX(void)
#endif #endif
} }
// Returns touch position Y for touch point 0 (relative to screen size) // Get touch position Y for touch point 0 (relative to screen size)
int GetTouchY(void) int GetTouchY(void)
{ {
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP) #if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP)
@ -3467,7 +3467,7 @@ int GetTouchY(void)
#endif #endif
} }
// Returns touch position XY for a touch point index (relative to screen size) // Get touch position XY for a touch point index (relative to screen size)
// TODO: Touch position should be scaled depending on display size and render size // TODO: Touch position should be scaled depending on display size and render size
Vector2 GetTouchPosition(int index) Vector2 GetTouchPosition(int index)
{ {

View File

@ -490,7 +490,7 @@ float GetGesturePinchAngle(void)
// Module specific Functions Definition // Module specific Functions Definition
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
#if defined(GESTURES_STANDALONE) #if defined(GESTURES_STANDALONE)
// Returns angle from two-points vector with X-axis // Get angle from two-points vector with X-axis
static float Vector2Angle(Vector2 v1, Vector2 v2) static float Vector2Angle(Vector2 v1, Vector2 v2)
{ {
float angle = atan2f(v2.y - v1.y, v2.x - v1.x)*(180.0f/PI); float angle = atan2f(v2.y - v1.y, v2.x - v1.x)*(180.0f/PI);

View File

@ -1004,22 +1004,22 @@ RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
// Screen-space-related functions // Screen-space-related functions
RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Returns size position for a 3d world space position RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
// Timing-related functions // Timing-related functions
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
RLAPI int GetFPS(void); // Returns current FPS RLAPI int GetFPS(void); // Get current FPS
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn (delta time) RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
RLAPI double GetTime(void); // Returns elapsed time in seconds since InitWindow() RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow()
// Misc. functions // Misc. functions
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format) RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS) RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
@ -1101,19 +1101,19 @@ RLAPI bool IsMouseButtonPressed(int button); // Detect if a mou
RLAPI bool IsMouseButtonDown(int button); // Detect if a mouse button is being pressed RLAPI bool IsMouseButtonDown(int button); // Detect if a mouse button is being pressed
RLAPI bool IsMouseButtonReleased(int button); // Detect if a mouse button has been released once RLAPI bool IsMouseButtonReleased(int button); // Detect if a mouse button has been released once
RLAPI bool IsMouseButtonUp(int button); // Detect if a mouse button is NOT being pressed RLAPI bool IsMouseButtonUp(int button); // Detect if a mouse button is NOT being pressed
RLAPI int GetMouseX(void); // Returns mouse position X RLAPI int GetMouseX(void); // Get mouse position X
RLAPI int GetMouseY(void); // Returns mouse position Y RLAPI int GetMouseY(void); // Get mouse position Y
RLAPI Vector2 GetMousePosition(void); // Returns mouse position XY RLAPI Vector2 GetMousePosition(void); // Get mouse position XY
RLAPI void SetMousePosition(int x, int y); // Set mouse position XY RLAPI void SetMousePosition(int x, int y); // Set mouse position XY
RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset
RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling
RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y RLAPI float GetMouseWheelMove(void); // Get mouse wheel movement Y
RLAPI void SetMouseCursor(int cursor); // Set mouse cursor RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
// Input-related functions: touch // Input-related functions: touch
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size) RLAPI int GetTouchX(void); // Get touch position X for touch point 0 (relative to screen size)
RLAPI int GetTouchY(void); // Returns touch position Y for touch point 0 (relative to screen size) RLAPI int GetTouchY(void); // Get touch position Y for touch point 0 (relative to screen size)
RLAPI Vector2 GetTouchPosition(int index); // Returns touch position XY for a touch point index (relative to screen size) RLAPI Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size)
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Gestures and Touch Handling Functions (Module: gestures) // Gestures and Touch Handling Functions (Module: gestures)
@ -1299,14 +1299,14 @@ RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle
RLAPI void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointsCount, Color tint); // Draw a textured polygon RLAPI void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointsCount, Color tint); // Draw a textured polygon
// Color/pixel related functions // Color/pixel related functions
RLAPI Color Fade(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
RLAPI int ColorToInt(Color color); // Returns hexadecimal value for a Color RLAPI int ColorToInt(Color color); // Get hexadecimal value for a Color
RLAPI Vector4 ColorNormalize(Color color); // Returns Color normalized as float [0..1] RLAPI Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1]
RLAPI Color ColorFromNormalized(Vector4 normalized); // Returns Color from normalized values [0..1] RLAPI Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
RLAPI Vector3 ColorToHSV(Color color); // Returns HSV values for a Color, hue [0..360], saturation/value [0..1] RLAPI Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Returns a Color from HSV values, hue [0..360], saturation/value [0..1] RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
RLAPI Color ColorAlpha(Color color, float alpha); // Returns color with alpha applied, alpha goes from 0.0f to 1.0f RLAPI Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Returns src alpha-blended into dst color with tint RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value
RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
@ -1362,7 +1362,7 @@ RLAPI char *TextToUtf8(int *codepoints, int length); // Encode
// UTF8 text strings management functions // UTF8 text strings management functions
RLAPI int *GetCodepoints(const char *text, int *count); // Get all codepoints in a string, codepoints count returned by parameters RLAPI int *GetCodepoints(const char *text, int *count); // Get all codepoints in a string, codepoints count returned by parameters
RLAPI int GetCodepointsCount(const char *text); // Get total number of characters (codepoints) in a UTF8 encoded string RLAPI int GetCodepointsCount(const char *text); // Get total number of characters (codepoints) in a UTF8 encoded string
RLAPI int GetNextCodepoint(const char *text, int *bytesProcessed); // Returns next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure RLAPI int GetNextCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure
RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode codepoint into utf8 text (char array length returned as parameter) RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode codepoint into utf8 text (char array length returned as parameter)
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------

View File

@ -609,7 +609,7 @@ RMDEF Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c)
return result; return result;
} }
// Returns Vector3 as float array // Get Vector3 as float array
RMDEF float3 Vector3ToFloatV(Vector3 v) RMDEF float3 Vector3ToFloatV(Vector3 v)
{ {
float3 buffer = { 0 }; float3 buffer = { 0 };
@ -644,7 +644,7 @@ RMDEF float MatrixDeterminant(Matrix mat)
return result; return result;
} }
// Returns the trace of the matrix (sum of the values along the diagonal) // Get the trace of the matrix (sum of the values along the diagonal)
RMDEF float MatrixTrace(Matrix mat) RMDEF float MatrixTrace(Matrix mat)
{ {
float result = (mat.m0 + mat.m5 + mat.m10 + mat.m15); float result = (mat.m0 + mat.m5 + mat.m10 + mat.m15);
@ -750,7 +750,7 @@ RMDEF Matrix MatrixNormalize(Matrix mat)
return result; return result;
} }
// Returns identity matrix // Get identity matrix
RMDEF Matrix MatrixIdentity(void) RMDEF Matrix MatrixIdentity(void)
{ {
Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f, Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f,
@ -811,7 +811,7 @@ RMDEF Matrix MatrixSubtract(Matrix left, Matrix right)
return result; return result;
} }
// Returns two matrix multiplication // Get two matrix multiplication
// NOTE: When multiplying matrices... the order matters! // NOTE: When multiplying matrices... the order matters!
RMDEF Matrix MatrixMultiply(Matrix left, Matrix right) RMDEF Matrix MatrixMultiply(Matrix left, Matrix right)
{ {
@ -837,7 +837,7 @@ RMDEF Matrix MatrixMultiply(Matrix left, Matrix right)
return result; return result;
} }
// Returns translation matrix // Get translation matrix
RMDEF Matrix MatrixTranslate(float x, float y, float z) RMDEF Matrix MatrixTranslate(float x, float y, float z)
{ {
Matrix result = { 1.0f, 0.0f, 0.0f, x, Matrix result = { 1.0f, 0.0f, 0.0f, x,
@ -893,7 +893,7 @@ RMDEF Matrix MatrixRotate(Vector3 axis, float angle)
return result; return result;
} }
// Returns x-rotation matrix (angle in radians) // Get x-rotation matrix (angle in radians)
RMDEF Matrix MatrixRotateX(float angle) RMDEF Matrix MatrixRotateX(float angle)
{ {
Matrix result = MatrixIdentity(); Matrix result = MatrixIdentity();
@ -909,7 +909,7 @@ RMDEF Matrix MatrixRotateX(float angle)
return result; return result;
} }
// Returns y-rotation matrix (angle in radians) // Get y-rotation matrix (angle in radians)
RMDEF Matrix MatrixRotateY(float angle) RMDEF Matrix MatrixRotateY(float angle)
{ {
Matrix result = MatrixIdentity(); Matrix result = MatrixIdentity();
@ -925,7 +925,7 @@ RMDEF Matrix MatrixRotateY(float angle)
return result; return result;
} }
// Returns z-rotation matrix (angle in radians) // Get z-rotation matrix (angle in radians)
RMDEF Matrix MatrixRotateZ(float angle) RMDEF Matrix MatrixRotateZ(float angle)
{ {
Matrix result = MatrixIdentity(); Matrix result = MatrixIdentity();
@ -942,7 +942,7 @@ RMDEF Matrix MatrixRotateZ(float angle)
} }
// Returns xyz-rotation matrix (angles in radians) // Get xyz-rotation matrix (angles in radians)
RMDEF Matrix MatrixRotateXYZ(Vector3 ang) RMDEF Matrix MatrixRotateXYZ(Vector3 ang)
{ {
Matrix result = MatrixIdentity(); Matrix result = MatrixIdentity();
@ -969,7 +969,7 @@ RMDEF Matrix MatrixRotateXYZ(Vector3 ang)
return result; return result;
} }
// Returns zyx-rotation matrix (angles in radians) // Get zyx-rotation matrix (angles in radians)
RMDEF Matrix MatrixRotateZYX(Vector3 ang) RMDEF Matrix MatrixRotateZYX(Vector3 ang)
{ {
Matrix result = { 0 }; Matrix result = { 0 };
@ -1004,7 +1004,7 @@ RMDEF Matrix MatrixRotateZYX(Vector3 ang)
return result; return result;
} }
// Returns scaling matrix // Get scaling matrix
RMDEF Matrix MatrixScale(float x, float y, float z) RMDEF Matrix MatrixScale(float x, float y, float z)
{ {
Matrix result = { x, 0.0f, 0.0f, 0.0f, Matrix result = { x, 0.0f, 0.0f, 0.0f,
@ -1015,7 +1015,7 @@ RMDEF Matrix MatrixScale(float x, float y, float z)
return result; return result;
} }
// Returns perspective projection matrix // Get perspective projection matrix
RMDEF Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far) RMDEF Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far)
{ {
Matrix result = { 0 }; Matrix result = { 0 };
@ -1047,7 +1047,7 @@ RMDEF Matrix MatrixFrustum(double left, double right, double bottom, double top,
return result; return result;
} }
// Returns perspective projection matrix // Get perspective projection matrix
// NOTE: Angle should be provided in radians // NOTE: Angle should be provided in radians
RMDEF Matrix MatrixPerspective(double fovy, double aspect, double near, double far) RMDEF Matrix MatrixPerspective(double fovy, double aspect, double near, double far)
{ {
@ -1058,7 +1058,7 @@ RMDEF Matrix MatrixPerspective(double fovy, double aspect, double near, double f
return result; return result;
} }
// Returns orthographic projection matrix // Get orthographic projection matrix
RMDEF Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far) RMDEF Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far)
{ {
Matrix result = { 0 }; Matrix result = { 0 };
@ -1087,7 +1087,7 @@ RMDEF Matrix MatrixOrtho(double left, double right, double bottom, double top, d
return result; return result;
} }
// Returns camera look-at matrix (view matrix) // Get camera look-at matrix (view matrix)
RMDEF Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up) RMDEF Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up)
{ {
Matrix result = { 0 }; Matrix result = { 0 };
@ -1118,7 +1118,7 @@ RMDEF Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up)
return result; return result;
} }
// Returns float array of matrix data // Get float array of matrix data
RMDEF float16 MatrixToFloatV(Matrix mat) RMDEF float16 MatrixToFloatV(Matrix mat)
{ {
float16 buffer = { 0 }; float16 buffer = { 0 };
@ -1175,7 +1175,7 @@ RMDEF Quaternion QuaternionSubtractValue(Quaternion q, float sub)
return result; return result;
} }
// Returns identity quaternion // Get identity quaternion
RMDEF Quaternion QuaternionIdentity(void) RMDEF Quaternion QuaternionIdentity(void)
{ {
Quaternion result = { 0.0f, 0.0f, 0.0f, 1.0f }; Quaternion result = { 0.0f, 0.0f, 0.0f, 1.0f };
@ -1351,7 +1351,7 @@ RMDEF Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to)
return result; return result;
} }
// Returns a quaternion for a given rotation matrix // Get a quaternion for a given rotation matrix
RMDEF Quaternion QuaternionFromMatrix(Matrix mat) RMDEF Quaternion QuaternionFromMatrix(Matrix mat)
{ {
Quaternion result = { 0 }; Quaternion result = { 0 };
@ -1385,7 +1385,7 @@ RMDEF Quaternion QuaternionFromMatrix(Matrix mat)
return result; return result;
} }
// Returns a matrix for a given quaternion // Get a matrix for a given quaternion
RMDEF Matrix QuaternionToMatrix(Quaternion q) RMDEF Matrix QuaternionToMatrix(Quaternion q)
{ {
Matrix result = MatrixIdentity(); Matrix result = MatrixIdentity();
@ -1415,7 +1415,7 @@ RMDEF Matrix QuaternionToMatrix(Quaternion q)
return result; return result;
} }
// Returns rotation quaternion for an angle and axis // Get rotation quaternion for an angle and axis
// NOTE: angle must be provided in radians // NOTE: angle must be provided in radians
RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle) RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
{ {
@ -1440,7 +1440,7 @@ RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
return result; return result;
} }
// Returns the rotation angle and axis for a given quaternion // Get the rotation angle and axis for a given quaternion
RMDEF void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle) RMDEF void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle)
{ {
if (fabs(q.w) > 1.0f) q = QuaternionNormalize(q); if (fabs(q.w) > 1.0f) q = QuaternionNormalize(q);
@ -1466,7 +1466,7 @@ RMDEF void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle
*outAngle = resAngle; *outAngle = resAngle;
} }
// Returns the quaternion equivalent to Euler angles // Get the quaternion equivalent to Euler angles
// NOTE: Rotation order is ZYX // NOTE: Rotation order is ZYX
RMDEF Quaternion QuaternionFromEuler(float pitch, float yaw, float roll) RMDEF Quaternion QuaternionFromEuler(float pitch, float yaw, float roll)
{ {

View File

@ -546,7 +546,7 @@ RLAPI void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation);
RLAPI void rlglInit(int width, int height); // Initialize rlgl (buffers, shaders, textures, states) RLAPI void rlglInit(int width, int height); // Initialize rlgl (buffers, shaders, textures, states)
RLAPI void rlglClose(void); // De-inititialize rlgl (buffers, shaders, textures) RLAPI void rlglClose(void); // De-inititialize rlgl (buffers, shaders, textures)
RLAPI void rlLoadExtensions(void *loader); // Load OpenGL extensions (loader function required) RLAPI void rlLoadExtensions(void *loader); // Load OpenGL extensions (loader function required)
RLAPI int rlGetVersion(void); // Returns current OpenGL version RLAPI int rlGetVersion(void); // Get current OpenGL version
RLAPI int rlGetFramebufferWidth(void); // Get default framebuffer width RLAPI int rlGetFramebufferWidth(void); // Get default framebuffer width
RLAPI int rlGetFramebufferHeight(void); // Get default framebuffer height RLAPI int rlGetFramebufferHeight(void); // Get default framebuffer height
@ -1892,7 +1892,7 @@ void rlLoadExtensions(void *loader)
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2 #endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
} }
// Returns current OpenGL version // Get current OpenGL version
int rlGetVersion(void) int rlGetVersion(void)
{ {
#if defined(GRAPHICS_API_OPENGL_11) #if defined(GRAPHICS_API_OPENGL_11)

View File

@ -1123,7 +1123,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
return vec; return vec;
} }
// Returns index position for a unicode character on spritefont // Get index position for a unicode character on spritefont
int GetGlyphIndex(Font font, int codepoint) int GetGlyphIndex(Font font, int codepoint)
{ {
#ifndef GLYPH_NOTFOUND_CHAR_FALLBACK #ifndef GLYPH_NOTFOUND_CHAR_FALLBACK
@ -1586,7 +1586,7 @@ int *GetCodepoints(const char *text, int *count)
return codepoints; return codepoints;
} }
// Returns total number of characters(codepoints) in a UTF8 encoded text, until '\0' is found // Get total number of characters(codepoints) in a UTF8 encoded text, until '\0' is found
// NOTE: If an invalid UTF8 sequence is encountered a '?'(0x3f) codepoint is counted instead // NOTE: If an invalid UTF8 sequence is encountered a '?'(0x3f) codepoint is counted instead
int GetCodepointsCount(const char *text) int GetCodepointsCount(const char *text)
{ {
@ -1608,7 +1608,7 @@ int GetCodepointsCount(const char *text)
} }
#endif // SUPPORT_TEXT_MANIPULATION #endif // SUPPORT_TEXT_MANIPULATION
// Returns next codepoint in a UTF8 encoded text, scanning until '\0' is found // Get next codepoint in a UTF8 encoded text, scanning until '\0' is found
// When a invalid UTF8 byte is encountered we exit as soon as possible and a '?'(0x3f) codepoint is returned // When a invalid UTF8 byte is encountered we exit as soon as possible and a '?'(0x3f) codepoint is returned
// Total number of bytes processed are returned as a parameter // Total number of bytes processed are returned as a parameter
// NOTE: the standard says U+FFFD should be returned in case of errors // NOTE: the standard says U+FFFD should be returned in case of errors

View File

@ -3553,7 +3553,7 @@ void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2
rlSetTexture(0); rlSetTexture(0);
} }
// Returns color with alpha applied, alpha goes from 0.0f to 1.0f // Get color with alpha applied, alpha goes from 0.0f to 1.0f
Color Fade(Color color, float alpha) Color Fade(Color color, float alpha)
{ {
if (alpha < 0.0f) alpha = 0.0f; if (alpha < 0.0f) alpha = 0.0f;
@ -3562,13 +3562,13 @@ Color Fade(Color color, float alpha)
return (Color){color.r, color.g, color.b, (unsigned char)(255.0f*alpha)}; return (Color){color.r, color.g, color.b, (unsigned char)(255.0f*alpha)};
} }
// Returns hexadecimal value for a Color // Get hexadecimal value for a Color
int ColorToInt(Color color) int ColorToInt(Color color)
{ {
return (((int)color.r << 24) | ((int)color.g << 16) | ((int)color.b << 8) | (int)color.a); return (((int)color.r << 24) | ((int)color.g << 16) | ((int)color.b << 8) | (int)color.a);
} }
// Returns color normalized as float [0..1] // Get color normalized as float [0..1]
Vector4 ColorNormalize(Color color) Vector4 ColorNormalize(Color color)
{ {
Vector4 result; Vector4 result;
@ -3581,7 +3581,7 @@ Vector4 ColorNormalize(Color color)
return result; return result;
} }
// Returns color from normalized values [0..1] // Get color from normalized values [0..1]
Color ColorFromNormalized(Vector4 normalized) Color ColorFromNormalized(Vector4 normalized)
{ {
Color result; Color result;
@ -3594,7 +3594,7 @@ Color ColorFromNormalized(Vector4 normalized)
return result; return result;
} }
// Returns HSV values for a Color // Get HSV values for a Color
// NOTE: Hue is returned as degrees [0..360] // NOTE: Hue is returned as degrees [0..360]
Vector3 ColorToHSV(Color color) Vector3 ColorToHSV(Color color)
{ {
@ -3646,7 +3646,7 @@ Vector3 ColorToHSV(Color color)
return hsv; return hsv;
} }
// Returns a Color from HSV values // Get a Color from HSV values
// Implementation reference: https://en.wikipedia.org/wiki/HSL_and_HSV#Alternative_HSV_conversion // Implementation reference: https://en.wikipedia.org/wiki/HSL_and_HSV#Alternative_HSV_conversion
// NOTE: Color->HSV->Color conversion will not yield exactly the same color due to rounding errors // NOTE: Color->HSV->Color conversion will not yield exactly the same color due to rounding errors
// Hue is provided in degrees: [0..360] // Hue is provided in degrees: [0..360]
@ -3682,7 +3682,7 @@ Color ColorFromHSV(float hue, float saturation, float value)
return color; return color;
} }
// Returns color with alpha applied, alpha goes from 0.0f to 1.0f // Get color with alpha applied, alpha goes from 0.0f to 1.0f
Color ColorAlpha(Color color, float alpha) Color ColorAlpha(Color color, float alpha)
{ {
if (alpha < 0.0f) alpha = 0.0f; if (alpha < 0.0f) alpha = 0.0f;
@ -3691,7 +3691,7 @@ Color ColorAlpha(Color color, float alpha)
return (Color){color.r, color.g, color.b, (unsigned char)(255.0f*alpha)}; return (Color){color.r, color.g, color.b, (unsigned char)(255.0f*alpha)};
} }
// Returns src alpha-blended into dst color with tint // Get src alpha-blended into dst color with tint
Color ColorAlphaBlend(Color dst, Color src, Color tint) Color ColorAlphaBlend(Color dst, Color src, Color tint)
{ {
Color out = WHITE; Color out = WHITE;
@ -3746,7 +3746,7 @@ Color ColorAlphaBlend(Color dst, Color src, Color tint)
return out; return out;
} }
// Returns a Color struct from hexadecimal value // Get a Color struct from hexadecimal value
Color GetColor(int hexValue) Color GetColor(int hexValue)
{ {
Color color; Color color;