# Vector2 Class Reference

`#include <Vector2.h>`

List of all members.

## Public Member Functions
| Vector2 ()
| Vector2 (const float &x, const float &y)
| Vector2 (const Vector2 &vector)
| ~Vector2 ()
void | set (float xx, float yy)
| operator const float * () const
Vector2 | operator+ (const Vector2 &vector) const
Vector2 & | operator+= (const Vector2 &vector)
Vector2 | operator- (const Vector2 &vector) const
Vector2 & | operator-= (const Vector2 &vector)
Vector2 | operator* (const Vector2 &vector) const
Vector2 | operator* (const float &f) const
Vector2 & | operator*= (const float &f)
Vector2 | operator/ (const float &f) const
Vector2 & | operator/= (const float &f)
Vector2 & | operator= (const Vector2 &vector)
bool | operator== (const Vector2 &vector) const
void | normalise ()
Vector2 | perpendicular ()
float | getLength () const
float | getLengthSqrd () const
## Static Public Member Functions
static float | dot (const Vector2 &left, const Vector2 &right)
static float | cross (const Vector2 &left, const Vector2 &right)
static Vector2 | vmin (const Vector2 &a, const Vector2 &b)
static Vector2 | vmax (const Vector2 &a, const Vector2 &b)
static bool | isRoughlyEqual (const Vector2 &a, const Vector2 &b)
## Public Attributes
float | x
float | y

## Detailed Description

Definition at line 9 of file Vector2.h.

## Constructor & Destructor Documentation

Vector2::Vector2 | ( |  | ) | `[inline]`

Definition at line 12 of file Vector2.h.

Vector2::Vector2 | ( | const float & | x,
|  | const float & | y |
| ) |  |  | `[inline]`

Definition at line 13 of file Vector2.h.

Vector2::Vector2 | ( | const Vector2 & | vector | ) | `[inline]`

Definition at line 14 of file Vector2.h.

Vector2::~Vector2 | ( |  | ) | `[inline]`

Definition at line 15 of file Vector2.h.

## Member Function Documentation

float Vector2::cross | ( | const Vector2 & | left,
|  | const Vector2 & | right |
| ) |  |  | `[static]`

Definition at line 97 of file Vector2.cpp.

float Vector2::dot | ( | const Vector2 & | left,
|  | const Vector2 & | right |
| ) |  |  | `[static]`

Definition at line 92 of file Vector2.cpp.

float Vector2::getLength | ( |  | ) | const

Definition at line 118 of file Vector2.cpp.

float Vector2::getLengthSqrd | ( |  | ) | const

Definition at line 124 of file Vector2.cpp.

bool Vector2::isRoughlyEqual | ( | const Vector2 & | a,
|  | const Vector2 & | b |
| ) |  |  | `[static]`

Definition at line 135 of file Vector2.cpp.

void Vector2::normalise | ( |  | ) |

Definition at line 77 of file Vector2.cpp.

Vector2::operator const float * | ( |  | ) | const

Definition at line 130 of file Vector2.cpp.

Vector2 Vector2::operator* | ( | const float & | f | ) | const

Definition at line 37 of file Vector2.cpp.

Vector2 Vector2::operator* | ( | const Vector2 & | vector | ) | const

Definition at line 32 of file Vector2.cpp.

Vector2 & Vector2::operator*= | ( | const float & | f | ) |

Definition at line 43 of file Vector2.cpp.

Vector2 Vector2::operator+ | ( | const Vector2 & | vector | ) | const

Definition at line 6 of file Vector2.cpp.

Vector2 & Vector2::operator+= | ( | const Vector2 & | vector | ) |

Definition at line 12 of file Vector2.cpp.

Vector2 Vector2::operator- | ( | const Vector2 & | vector | ) | const

Definition at line 19 of file Vector2.cpp.

Vector2 & Vector2::operator-= | ( | const Vector2 & | vector | ) |

Definition at line 25 of file Vector2.cpp.

Vector2 Vector2::operator/ | ( | const float & | f | ) | const

Definition at line 50 of file Vector2.cpp.

Vector2 & Vector2::operator/= | ( | const float & | f | ) |

Definition at line 57 of file Vector2.cpp.

Vector2 & Vector2::operator= | ( | const Vector2 & | vector | ) |

Definition at line 65 of file Vector2.cpp.

bool Vector2::operator== | ( | const Vector2 & | vector | ) | const

Definition at line 72 of file Vector2.cpp.

Vector2 Vector2::perpendicular | ( |  | ) |

Definition at line 87 of file Vector2.cpp.

void Vector2::set | ( | float | xx,
|  | float | yy |
| ) |  |  | `[inline]`

Definition at line 17 of file Vector2.h.

Vector2 Vector2::vmax | ( | const Vector2 & | a,
|  | const Vector2 & | b |
| ) |  |  | `[static]`

Definition at line 110 of file Vector2.cpp.

Vector2 Vector2::vmin | ( | const Vector2 & | a,
|  | const Vector2 & | b |
| ) |  |  | `[static]`

Definition at line 102 of file Vector2.cpp.

## Member Data Documentation

float Vector2::x

Definition at line 43 of file Vector2.h.

float Vector2::y

Definition at line 43 of file Vector2.h.

The documentation for this class was generated from the following files:

- C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/Vector2.h
- C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/Vector2.cpp