Function rotate
Defined in File utils.hpp
Function Documentation
-
std::vector<arma::vec2> rotate(const std::vector<arma::vec2> points, double angle)
Rotates a vector of 2D points by a specified angle.
This function takes a vector of 2D points and rotates each point around the origin by the given angle (in radians). The rotation is performed using a standard 2D rotation matrix, being counterclockwise if theta is negative.
- Parameters:
points – A vector of 2D points (arma::vec2) to be rotated.
angle – The angle of rotation in radians.
- Returns:
A vector of 2D points after rotation.