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

#include <lib/egg/math.hpp>

Inheritance diagram for EGG::Vector2f:
[legend]

Description

A two-dimensional floating point vector.

Definition at line 26 of file math.hpp.

Public Member Functions

 Vector2f ()
 Constructs an empty vector.
 
 Vector2f (f32 fx, f32 fy)
 Constructs a vector from two floating point values.
 
 Vector2f (const Vector2f &v)
 Constructs a new vector from an existing vector.
 
void set (float x, float y)
 
float normalise ()
 
float getLength () const
 Gets the length of the vector.
 
- Public Member Functions inherited from nw4r::math::VEC2
 VEC2 (float fx, float fy)
 
 VEC2 (const VEC2 &v)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Vector2f() [1/3]

EGG::Vector2f::Vector2f ( )
inline

Constructs an empty vector.

Definition at line 29 of file math.hpp.

◆ ~Vector2f()

EGG::Vector2f::~Vector2f ( )
inline

Definition at line 31 of file math.hpp.

◆ Vector2f() [2/3]

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

Constructs a vector from two floating point values.

Definition at line 34 of file math.hpp.

◆ Vector2f() [3/3]

EGG::Vector2f::Vector2f ( const Vector2f & v)
inline

Constructs a new vector from an existing vector.

Definition at line 37 of file math.hpp.

Member Function Documentation

◆ set()

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

Definition at line 39 of file math.hpp.

◆ getLength()

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

Gets the length of the vector.

Definition at line 47 of file math.hpp.