TGUI  1.2.0
Loading...
Searching...
No Matches
tgui::Vector2< T > Class Template Reference

Public Member Functions

constexpr Vector2 ()=default
 Default constructor.
 
constexpr Vector2 (T xValue, T yValue)
 Constructor to create from X and Y values.
 
template<typename U >
constexpr Vector2 (const Vector2< U > &vec)
 Constructs the vector from an another Vector2 with a different type.
 
constexpr Vector2 (const sf::Vector2< T > &vec)
 Copy constructor to create from an sf::Vector2.
 
 Vector2 (const char *str)
 Constructor to create from a string.
 
 Vector2 (String str)
 Constructor to create from a string.
 
TGUI_NODISCARD operator sf::Vector2< T > () const
 Converts this object into an sf::Vector2 object.
 

Public Attributes

x = 0
 X coordinate of the vector.
 
y = 0
 Y coordinate of the vector.
 

Constructor & Destructor Documentation

◆ Vector2()

template<typename T >
template<typename U >
constexpr tgui::Vector2< T >::Vector2 ( const Vector2< U > & vec)
inlineexplicitconstexpr

Constructs the vector from an another Vector2 with a different type.

Parameters
vecVector to copy

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