Files
fphysics/vec_util.h
T

22 lines
525 B
C

#pragma once
#ifndef VEC_UTIL_H_
#define VEC_UTIL_H_
#include <math.h>
#include <raylib.h>
static const Vector2 NULL_VEC2 = {0, 0};
bool vec2_is_null(Vector2 v) ;
Vector2 transform_to_center(Vector2 v);
Vector2 vec2_sum(const Vector2 *a, const Vector2 *b);
float vec2_len(Vector2 v) ;
Vector2 vec2_normalize(const Vector2 v) ;
Vector2 vec2_scale(const Vector2 *normal, const float len) ;
float vec2_dot(const Vector2 *a, const Vector2 *b) ;
Vector2 vec2_diff(const Vector2 *a, const Vector2 *b) ;
#endif // VEC_UTIL_H_