- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FMVector2 Class Reference
[Mathematics Classes.]

A 2 dimensional vector. More...

`#include <FMVector2.h>`

List of all members.

## Public Member Functions
| FMVector2 ()
| Creates an empty FMVector2.
| FMVector2 (float _u, float _v)
| Creates the vector with the coordinates given.
float | LengthSquared () const
| Retrieves the squared length of the vector.
float | Length () const
| Retrieves the length of the vector.
void | NormalizeIt ()
| Normalizes this vector.
FMVector2 | Normalize () const
| Get a normalized vector with the same direction as this vector.
| operator float * ()
| Get this vector as an array of `floats`.
FMVector2 & | operator+= (const FMVector2 &a)
| Adds two vector.
FMVector2 & | operator *= (float a)
| Multiplies this vector by a scaler.
FMVector2 & | operator= (const float *f)
| Assign this vector to the given float array.
## Static Public Attributes
static const FMVector2 | Zero
| The zero vector.
static const FMVector2 | Origin
| The zero vector.
static const FMVector2 | XAxis
| The 2D X axis.
static const FMVector2 | YAxis
| The 2D Y axis.

## Detailed Description

A 2 dimensional vector.

Not used within FCollada.

## Constructor & Destructor Documentation

FMVector2::FMVector2 | ( | float | _u,
|  | float | _v
| ) | `[inline]`

  | Creates the vector with the coordinates given. Parameters:
  | _u | The first coordinate.
  | _v | The second coordinate.

## Member Function Documentation

float FMVector2::Length | ( |  | ) | const`[inline]`

| Retrieves the length of the vector. Returns: The length of this vector.

float FMVector2::LengthSquared | ( |  | ) | const`[inline]`

| Retrieves the squared length of the vector. Returns: The squared length of this vector.

FMVector2 FMVector2::Normalize | ( |  | ) | const`[inline]`

| Get a normalized vector with the same direction as this vector. Returns: A vector with length 1 and same direction as this vector.

FMVector2& FMVector2::operator *= | ( | float | a | ) | `[inline]`

  | Multiplies this vector by a scaler. Multiplies each of this vector's coordinates with the scaler and returns this vector. Parameters:
  | a | The scalar to multiply with.
Returns: This vector.

FMVector2::operator float * | ( |  | ) | `[inline]`

| Get this vector as an array of `floats`. Returns: The `float` array.

FMVector2& FMVector2::operator+= | ( | const FMVector2 & | a | ) | `[inline]`

  | Adds two vector. Adds to this vector's coordinates the individual components of the given vector and returns this vector. Parameters:
  | a | The vector to add with this one.
Returns: This vector.

FMVector2& FMVector2::operator= | ( | const float * | f | ) | `[inline]`

  | Assign this vector to the given float array. Assigns each coordinate of this vector to the elements in the `float` array. The first element to the first coordinate and the second to the second. It returns this vector. Parameters:
  | f | The `float` array to assign with.
Returns: This vector.

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

- FMath/FMVector2.h