Raylib C++  1.0.0
Encapsulates the raylib library
Public Member Functions | Public Attributes | List of all members
raylib::Vector2< T > Struct Template Referencefinal

Struct containing a vector with 2 dimensions. More...

#include <Vector.hpp>

Inheritance diagram for raylib::Vector2< T >:
Inheritance graph
Collaboration diagram for raylib::Vector2< T >:
Collaboration graph

Public Member Functions

 Vector2 ()=default
 Default constructor. More...
 
 Vector2 (T x, T y)
 Create a Vector2. More...
 
bool operator== (const Vector2< T > &other) const
 Compare the x & y values of two vectors. More...
 
bool operator!= (const Vector2< T > &other) const
 Compare the x & y values of two vectors. More...
 

Public Attributes

x
 
y
 

Detailed Description

template<typename T>
struct raylib::Vector2< T >

Struct containing a vector with 2 dimensions.

Template Parameters
Tthe type of the vector

Constructor & Destructor Documentation

◆ Vector2() [1/2]

template<typename T >
raylib::Vector2< T >::Vector2 ( )
default

Default constructor.

Attention
Don't use this, this will result on undefined behavior

◆ Vector2() [2/2]

template<typename T >
raylib::Vector2< T >::Vector2 ( x,
y 
)
inline

Create a Vector2.

Parameters
xthe x value
ythe y value

Member Function Documentation

◆ operator!=()

template<typename T >
bool raylib::Vector2< T >::operator!= ( const Vector2< T > &  other) const
inline

Compare the x & y values of two vectors.

Parameters
otherthe other vector to compare
Returns
true if it's not equal, false otherwise

◆ operator==()

template<typename T >
bool raylib::Vector2< T >::operator== ( const Vector2< T > &  other) const
inline

Compare the x & y values of two vectors.

Parameters
otherthe other vector to compare
Returns
true if it's equal, false otherwise

Member Data Documentation

◆ x

template<typename T >
T raylib::Vector2< T >::x

◆ y

template<typename T >
T raylib::Vector2< T >::y

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