vectQrot: Rotate a vector by a quaternion

Description Usage Arguments Value Author(s) Examples

Description

vectQrot performs a vector rotation by a quaternion.

Usage

1
vectQrot(Q, rr)

Arguments

Q

Quaternion (Q) vector [q1, q2, q3, q4].

rr

Vector [x, y, z].

Value

Rotated vector [x, y, z].

Author(s)

Jose Gama

Examples

1
2
3
Q <- c(-0.1677489, -0.7369231, -0.3682588, 0.5414703)
v <- c(1, 2, 3)
vectQrot(Q, v)

Example output

[1] -1.900202 -1.075263 -3.038592

RSpincalc documentation built on May 2, 2019, 10:59 a.m.