If you rotate point (px, py)
around point (ox, oy)
by angle theta
you’ll get:
p'x = cos(theta) * (px-ox) - sin(theta) * (py-oy) + ox p'y = sin(theta) * (px-ox) + cos(theta) * (py-oy) + oy
More Related Contents:
- Calculating point on a circle’s circumference from angle in C#?
- Rotate image math (C#)
- C# Line is horizontal
- How to check if a number is a power of 2
- All Possible Combinations of a list of Values
- How do I round to the nearest 0.5?
- How to calculate float type precision and does it make sense?
- Direct way of computing clockwise angle between 2 vectors
- Smoothly connecting circle centers
- How do I determine the standard deviation (stddev) of a set of values?
- What is the algorithm to convert an Excel Column Letter into its Number?
- Algorithm to find which numbers from a list of size n sum to another number
- How deterministic is floating point inaccuracy?
- Double precision problems on .NET
- 3D relative angle sum calculation
- Best way to find all factors of a given number
- How to tell whether a point is to the right or left side of a line
- How can I get a count of the total number of digits in a number?
- Calculate a point along the line A-B at a given distance from A
- Using a matrix to rotate rectangles individually
- How to force a number to be in a range in C#? [duplicate]
- How can I generate truly (not pseudo) random numbers with C#?
- How can I calculate divide and modulo for integers in C#?
- Rotate a point around another point
- Fastest implementation of log2(int) and log2(float)
- Best algorithm for evaluating a mathematical expression?
- how to calculate reverse modulus
- Direct way of computing the clockwise angle between two vectors
- Rotate Point around pivot Point repeatedly
- Why doesn’t C# use arithmetic overflow checking by default? [duplicate]