util.ang2mat {RGeostats}R Documentation

Converts angles (degrees) to rotation matrix

Description

Convert a vector of angles (degrees) into a rotation matrix

Usage

util.ang2mat(ndim, angles, flag.rad = FALSE)

Arguments

ndim

Space dimension

angles

Vector of angles in degrees (Dimension = ndim). If ndim=1, the rotation is meaningless ; If ndim=2, only the first angle is used ; If ndim>3, an error is returned.

flag.rad

If FALSE, angles are given in degrees. If TRUE, angles are given in radians.

Value

The rotation matrix. Its dimension is ndim*ndim. If ndim=1, it is returned filled with the arbitrary value 1.


[Package RGeostats version 11.2.12 Index]