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
|
@ -45,6 +45,17 @@ z(Z)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
template <typename U>
|
||||
inline Vector3<T>::Vector3(const Vector3<U>& vector) :
|
||||
x(static_cast<T>(vector.x)),
|
||||
y(static_cast<T>(vector.y)),
|
||||
z(static_cast<T>(vector.z))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator -(const Vector3<T>& left)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue