MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / Vector2

Class Vector2

engine/src/vector.h:13–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <math.h>
12
13class Vector2
14{
15public:
16 float x, y;
17
18 Vector2(float _x = 0, float _y = 0);
19 ~Vector2();
20
21 Vector2& operator = (const Vector2 &rhs);
22 Vector2& operator += (const Vector2 &rhs);
23 Vector2& operator -= (const Vector2 &rhs);
24 Vector2 operator * (float rhs) const;
25 Vector2 operator / (float rhs) const;
26 Vector2 operator + (const Vector2 &rhs) const;
27 Vector2 operator - (const Vector2 &rhs) const;
28 Vector2 Integer();
29 void Rotate(float angle);
30 float CrossProduct(const Vector2 &rhs) const;
31 float Magnitude();
32 void Normalize();
33 float DotProduct(const Vector2 &rhs) const;
34};
35
36class Vector3
37{

Callers 15

loadLevelMethod · 0.85
initializeMethod · 0.85
TileMapMethod · 0.85
G_initializeGameFunction · 0.85
initializeMethod · 0.85
operator *Method · 0.85
operator /Method · 0.85
operator +Method · 0.85
operator -Method · 0.85
IntegerMethod · 0.85
PositionEventListMethod · 0.85
AddEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected