﻿RotationArbitraryAxis Method        A spatial [3x3] rotation matrix defining a rotation around a given axis.

Namespace:  ceometric.VectorGeometry
Assembly:  ceometric.VectorGeometry (in ceometric.VectorGeometry.dll) Version: 1.8.0.0 (1.8.0.0)

# Syntax

C#
```public static Matrix3d RotationArbitraryAxis(
Vector3d axis,
)```
Visual Basic (Declaration)
```Public Shared Function RotationArbitraryAxis ( _
axis As Vector3d, _
radian As Double _
) As Matrix3d```
Visual C++
```public:
static Matrix3d^ RotationArbitraryAxis(
Vector3d^ axis,
)```

#### Parameters

axis
Type: ceometric.VectorGeometry..::.Vector3d
A 3d vector defining the axis of rotation.
Type: System..::.Double
The rotation angle in [radian].

#### Return Value

Returns a [3x3] rotation matrix defining a rotation around a given axis.

# Remarks

The sense of the rotation depends on the direction of the axis vector according to the right-hand-rule.

# Examples

The following example rotates a point 90 degrees around the z-axis: CopyC#
```Point p = new Point(1,0,0);
Matrix3d rMat = Matrix3d.RotationArbitraryAxis(new Vector3d(0,0,1), Math.Pi/2);
Point rotatedPoint = rMat * p;```
The coordinates of the rotated point are (0,1,0).