RotMatrixY

Rotates a matrix around the Y-Axis

MATRIX* RotMatrixY (
        long r,
        MATRIX *m
)

Arguments

r Input rotation amount
m Pointer to the matrix (used for both input and result)

Return Value

The rotated matrix m is returned.

Explanation

The matrix m is rotated around the Y-axis by the amount specified by r.
In the rotation amount, 360° is represented as 4096, and 4096 is equivalent to 1.0.
The matrix is calculated as follows:

 c   0   -s 
[  0   1   0  ]m
 c   0   c 

Angle value:
c=cos(r), s=sin(r)

The argument format is as follows.
    m->m[i][j] : (1,3,12)
    r: (1,3,12) (however 360° is 1.0)

See Also

MATRIX