NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
EGG::Vector2f Class Reference

#include <lib/egg/math/eggVector.h>

Inheritance diagram for EGG::Vector2f:
[legend]

Description

A two-dimensional floating point vector.

Definition at line 9 of file eggVector.h.

Public Member Functions

 Vector2f ()
 Constructs an empty vector.
 
 Vector2f (f32 fx, f32 fy)
 Constructs a vector from two floating point values.
 
void set (float x, float y)
 
float normalise ()
 
float squaredLength () const
 Gets the squared length of the vector.
 
float length () const
 Gets the length of the vector.
 
- Public Member Functions inherited from nw4r::math::VEC2
 VEC2 (f32 fx, f32 fy)
 
 operator f32 * ()
 
 operator const f32 * () const
 
VEC2 operator+ (const VEC2 &rRhs) const
 
VEC2 operator- (const VEC2 &rRhs) const
 
VEC2operator+= (const VEC2 &rRhs)
 
VEC2operator-= (const VEC2 &rRhs)
 
bool operator== (const VEC2 &rRhs) const
 
bool operator!= (const VEC2 &rRhs) const
 

Additional Inherited Members

- Public Attributes inherited from nw4r::math::_VEC2
f32 x
 
f32 y
 

Constructor & Destructor Documentation

◆ Vector2f() [1/2]

EGG::Vector2f::Vector2f ( )
inline

Constructs an empty vector.

Definition at line 12 of file eggVector.h.

◆ ~Vector2f()

EGG::Vector2f::~Vector2f ( )
inline

Definition at line 14 of file eggVector.h.

◆ Vector2f() [2/2]

EGG::Vector2f::Vector2f ( f32 fx,
f32 fy )
inline

Constructs a vector from two floating point values.

Definition at line 17 of file eggVector.h.

Member Function Documentation

◆ set()

void EGG::Vector2f::set ( float x,
float y )
inline

Definition at line 19 of file eggVector.h.

◆ squaredLength()

float EGG::Vector2f::squaredLength ( ) const
inline

Gets the squared length of the vector.

Definition at line 27 of file eggVector.h.

◆ length()

float EGG::Vector2f::length ( ) const
inline

Gets the length of the vector.

Definition at line 30 of file eggVector.h.