rotate 2d vector by angle

rotate vector (x1, y1) counterclockwise by the given angle
(angle in radians)

newX = oldX * cos(angle) - oldY * sin(angle)
newY = oldX * sin(angle) + oldY * cos(angle)

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to find vector from rotation 2d rotate 2d array using vector cpp vector 2d rotation how to rotate a 2d vector arounda point rotate 2d vector 90 degrees rotate a 2d vector around a point rotation to 2d direction vector rotate a vector in 2d rotate a 2d vector c++ rotation of a vector in 2d rotate a 2d matrix rotate 2d vector 90 degrees c++ rotating a 2d vector by 90 degree rotate 2d matrix by 90 degree how to describe 2d vector rotations rotate 2d vector around point rotate a 2d matrix by 90 degrees rotation of 2d vector rotate 2d array by 90 degrees how to rotate 2d vectors? rotate 2d vector arbitrary angle how to rotate a vector in 2d rotate 2d matrix rotate a 2d vector rotate vector rotate 2d vector math how to rotate a vector by n degrees rotate by vector 3 unity move a vector by an angle How to use unit vector rotation rotate vector calculator 2d rotating arounf a point in 2d using matrix 2d vector rotation vector with length rotate around origin c# rotate vector around y axis rotation in degrees into vector how to rotate a normalized vector rotatining a normalized vector turn rotation into a vector rotate a vector rotation in sin and cos how to rotate a vector by an angle change angle of vector apply rotation on 2d vector radians rotation 2d vector radians rotating a vector point how to properly rotate a 2d vector rotate vector by degrees python rotate 2d vector 90 rotate 2d vector rotate a vector 90 degrees prove that one vector is a rotation of another rotate 2d vector by angle
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source