Synopsis

PDX_MSGT mth_GetAxisMatrix(double ax_dir[3], double ang, double rot[3][3])

Purpose

Get matrix to rotate points/vectors about axis.

Description

This routine computes the matrix which rotates points/vectors through an angle, ang, about the axis line which passes through the origin and has direction ax_dir. A positive angle corresponds to a counterclockwise rotation, viewed looking in the direction of ax_dir.

Input

ax_dir

Direction of axis through origin.

ang

Rotation angle (in radians).

Output

rot

The 3x3 rotation matrix.

Return

MTH_NOERR