SaturnRingLibrary 0.9.1
SGL wrapper
 
Loading...
Searching...
No Matches

◆ RotateY()

Matrix33 & SRL::Math::Types::Matrix33::RotateY ( const Angle & angleY)
inlineconstexprinherited

Apply Y-axis rotation to the current matrix.

Modifies the current matrix by applying a rotation around the Y-axis. This is equivalent to multiplying the current matrix by a rotation matrix.

The Y-axis rotation matrix is: | cos(θ) 0 sin(θ) | | 0 1 0 | | -sin(θ) 0 cos(θ) |

Parameters
angleYRotation angle around Y-axis.
Returns
Reference to this matrix after rotation.
Note
This is ideal for continuous transformations like animation as it modifies the existing matrix rather than creating a new one.
transform.RotateY(Angle::FromDegrees(45)); // Rotate 45° around Y
static consteval Angle FromDegrees(double degrees)
Creates angle from degrees at compile time.
Definition angle.hpp:204
static consteval Matrix33 Identity()
Create an identity matrix.
Definition mat33.hpp:719
constexpr Matrix33 & RotateY(const Angle &angleY)
Apply Y-axis rotation to the current matrix.
Definition mat33.hpp:354
constexpr Matrix33()
Default constructor initializing to a zero matrix.
Definition mat33.hpp:76