Added explicit conversions between different types of sf::Vector2, sf::Vector3 and sf::Rect (implements feature #31)
This commit is contained in:
parent
ade8cb8771
commit
eac841ec71
6 changed files with 75 additions and 0 deletions
|
@ -56,6 +56,20 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
Vector3(T X, T Y, T Z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct the vector from another type of vector
|
||||
///
|
||||
/// This constructor doesn't replace the copy constructor,
|
||||
/// it's called only when U != T.
|
||||
/// A call to this constructor will fail to compile if U
|
||||
/// is not convertible to T.
|
||||
///
|
||||
/// \param vector Vector to convert
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename U>
|
||||
explicit Vector3(const Vector3<U>& vector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue