Improve sf::Transform documentation
Clarifies order of combine() and equivalence of operations. Closes #1608.
This commit is contained in:
parent
bf98acc61f
commit
519e1f9572
@ -100,6 +100,12 @@ public:
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Transform a 2D point
|
||||
///
|
||||
/// These two statements are equivalent:
|
||||
/// \code
|
||||
/// sf::Vector2f transformedPoint = matrix.transformPoint(x, y);
|
||||
/// sf::Vector2f transformedPoint = matrix * sf::Vector2f(x, y);
|
||||
/// \endcode
|
||||
///
|
||||
/// \param x X coordinate of the point to transform
|
||||
/// \param y Y coordinate of the point to transform
|
||||
///
|
||||
@ -111,6 +117,12 @@ public:
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Transform a 2D point
|
||||
///
|
||||
/// These two statements are equivalent:
|
||||
/// \code
|
||||
/// sf::Vector2f transformedPoint = matrix.transformPoint(point);
|
||||
/// sf::Vector2f transformedPoint = matrix * point;
|
||||
/// \endcode
|
||||
///
|
||||
/// \param point Point to transform
|
||||
///
|
||||
/// \return Transformed point
|
||||
@ -138,8 +150,14 @@ public:
|
||||
/// \brief Combine the current transform with another one
|
||||
///
|
||||
/// The result is a transform that is equivalent to applying
|
||||
/// *this followed by \a transform. Mathematically, it is
|
||||
/// equivalent to a matrix multiplication.
|
||||
/// \a transform followed by *this. Mathematically, it is
|
||||
/// equivalent to a matrix multiplication (*this) * transform.
|
||||
///
|
||||
/// These two statements are equivalent:
|
||||
/// \code
|
||||
/// left.combine(right);
|
||||
/// left *= right;
|
||||
/// \endcode
|
||||
///
|
||||
/// \param transform Transform to combine with this transform
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user