-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathutil.h
More file actions
executable file
·38 lines (28 loc) · 1.08 KB
/
util.h
File metadata and controls
executable file
·38 lines (28 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* util.h */
#ifndef UTIL_H
#define UTIL_H
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <raylib.h>
typedef float (*EasingFunc)(float, float, float);
float UtilDistance(Vector2 a, Vector2 b);
float UtilLerp(float v0, float v1, float t);
float UtilEaseInSine(float v0, float v1, float t);
float UtilEaseInCubic(float v0, float v1, float t);
float UtilSmoothstep(float A, float B, float v);
float UtilSmootherstep(float A, float B, float v);
float UtilNormalize(float start, float finish, float value);
float UtilMapValue(float value, float fromMin, float fromMax, float toMin, float toMax);
float UtilOverlapArea(Rectangle a, Rectangle b);
char* UtilOrdToShortString(int ord);
char* UtilOrdToLongString(int ord);
char* UtilSuitToShortString(int suit);
char* UtilSuitToLongString(int suit);
uint32_t UtilHash(char *str);
_Bool UtilRectangleWithinRectangle(Rectangle inner, Rectangle outer);
Vector2 UtilCenterTextInRectangle(Rectangle r, float width, float height);
Vector2 UtilVector2Add(Vector2 a, Vector2 b);
char* UtilStrDup(const char *s);
#endif