Physics4K  2013-06-04
Physics4K is the next great evolution in 2D physics engines. built upon the C++ Game Framework, it is going to take the next generation gaming world by storm.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Vector2f.h
Go to the documentation of this file.
1 // Filename: Vector2f.h
4 
5 //Preprocessor directive designed to cause the current source file to be included only once in a single compilation
6 #pragma once
7 
8 //Includes
9 #include <math.h>
10 #include "PKInclude.h"
11 
12 namespace PK
13 {
15  {
16  public:
17  Vector2f();
18  Vector2f(const Vector2f &copy);
19  Vector2f(float x, float y);
20  ~Vector2f();
21 
22  float Length();
23  void Normalize();
24 
25  Vector2f& operator=(const Vector2f &param);
26  Vector2f& operator+= (const Vector2f &param);
27  Vector2f& operator-= (const Vector2f &param);
28  Vector2f& operator*= (const float &param);
29  Vector2f& operator/= (const float &param);
30  const Vector2f operator+ (const Vector2f &param) const ;
31  const Vector2f operator- (const Vector2f &param)const ;
32  const Vector2f operator* (const float &param)const ;
33  const Vector2f operator/ (const float &param)const ;
34 
35  public:
36  float X;
37  float Y;
38  };
39 
40  //Inline methods
41  Vector2f operator* (float s, const Vector2f& v);
42  Vector2f operator/ (float s, const Vector2f& v);
43 }