Learn R Programming

libimath (version 3.1.9-4)

imath_rotate_point: Rotate Point

Description

This rotates a point around the origin at the angles specified. This function is primarily just included as an example of integrating the Imath library into a package. See imath-info.cpp in the source for the corresponding C++ code.

Usage

imath_rotate_point(point, angles)

Value

The rotated point as an R numeric vector

Arguments

point

A length-3 numeric vector (x, y, z)

angles

A length-3 numeric vector (rotation angles in radians)

Examples

Run this code
# This rotates a point around an angle.
point = c(1.0, 0.0, 0.0)
angles = c(0.0, pi/4, 0.0)
imath_rotate_point(point, angles)

Run the code above in your browser using DataLab