23 lines
586 B
C
23 lines
586 B
C
#ifndef ENGINE_VECTOR_H
|
|
#define ENGINE_VECTOR_H
|
|
|
|
#include <raylib.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
typedef struct {
|
|
Vector2 *data;
|
|
size_t count;
|
|
} Vector2Array;
|
|
|
|
Vector2 GetDirectionBetweenTwoVectors(Vector2 vec1, Vector2 vec2);
|
|
float GetDistanceBetweenTwoVectors(Vector2 vec1, Vector2 vec2);
|
|
bool IsVectorZero(Vector2 v);
|
|
Vector2 GetRandomVector(const Rectangle bounds);
|
|
Vector2 RotationToVector2(float rotation);
|
|
float Vector2ToRotation(Vector2 vec);
|
|
float Cross2D(Vector2 a, Vector2 b);
|
|
void ApplyCollisionSteer(float *rotation, float side, float deltaTime);
|
|
|
|
#endif
|