ArcGIS Pro 2.9 API Reference Guide
Rotate(Double,Coordinate2D) Method
Example 

ArcGIS.Core.Geometry Namespace > Coordinate2D Structure > Rotate Method : Rotate(Double,Coordinate2D) Method
The angle in radians defining the rotation.
The axis around which the Coordinate2D is rotated.
Rotates the Coordinate2D around an axis defined by another Coordinate2D.
Syntax
public void Rotate( 
   double angle,
   Coordinate2D axis
)
Public Overloads Sub Rotate( _
   ByVal angle As Double, _
   ByVal axis As Coordinate2D _
) 

Parameters

angle
The angle in radians defining the rotation.
axis
The axis around which the Coordinate2D is rotated.
Exceptions
ExceptionDescription
angle is NaN.
Remarks
The Coordinate2D is rotated a given input angle measured in radians around the specified axis defined by the input Coordinate2D.
Example
Coordinate2D v = new Coordinate2D(0, 1);
// v.Magnitude = 1

Coordinate2D other = new Coordinate2D(-1, 0);
double dotProduct = v.DotProduct(other);
// dotProduct = 0

Coordinate2D w = v + other;
// w = (-1, 1)

w += other;
// w = (-2, 1)

w -= other;
// w = (-1, 1)

w = v;
w.Rotate(Math.PI, other);
// w = (-2, -1)

w = other;

w.Scale(-4);
// w = (4, 0)
// w.Magnitude = 4

w.Move(-1, 4);
// w = (3, 4)
// w.Magnitude = 5

w.Move(-6, -1);
Tuple<double, double> components = w.QueryComponents();
// components = (-3, 3)
// w.Magnitude = 3 * Math.Sqrt(2)

Coordinate2D unitVector = w.GetUnitVector();
// w = (-Math.Sqrt(2) / 2, Math.Sqrt(2) / 2)
// w.Magnitude = 1


w.SetComponents(3, 4);
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

Coordinate2D Structure
Coordinate2D Members
Overload List