Archeus
0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
vector2.h
Go to the documentation of this file.
1
#ifndef ARC_MATH_VECTOR2_H_
2
#define ARC_MATH_VECTOR2_H_
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
typedef
struct
ARC_Vector2
{
9
float
x
,
y
;
10
}
ARC_Vector2
;
11
12
typedef
struct
ARC_DVector2
{
13
double
x
,
y
;
14
}
ARC_DVector2
;
15
16
/**
17
* @brief normalizes a given ARC_Vector2
18
*
19
* @param vector the ARC_Vecotr2 to normallize
20
*/
21
void
ARC_Vector2_Normalize
(
ARC_Vector2
*vector);
22
23
/**
24
* @brief rotates a given ARC_Vector2 by a given angle in degrees
25
*
26
* @param vector the ARC_Vector2 to rotate
27
* @param angle the angle in degrees to rotate by
28
*/
29
void
ARC_Vector2_RotateDegree
(
ARC_Vector2
*vector,
float
angle);
30
31
#ifdef __cplusplus
32
}
33
#endif
34
35
#endif
// ARC_MATH_VECTOR2_H_
ARC_DVector2
Definition
vector2.h:12
ARC_DVector2::y
double y
Definition
vector2.h:13
ARC_DVector2::x
double x
Definition
vector2.h:13
ARC_Vector2
Definition
vector2.h:8
ARC_Vector2::x
float x
Definition
vector2.h:9
ARC_Vector2::y
float y
Definition
vector2.h:9
ARC_Vector2_RotateDegree
void ARC_Vector2_RotateDegree(ARC_Vector2 *vector, float angle)
rotates a given ARC_Vector2 by a given angle in degrees
ARC_DVector2
struct ARC_DVector2 ARC_DVector2
ARC_Vector2
struct ARC_Vector2 ARC_Vector2
ARC_Vector2_Normalize
void ARC_Vector2_Normalize(ARC_Vector2 *vector)
normalizes a given ARC_Vector2
include
arc
math
vector2.h