Skip to contents

Quaternion To Matrix

Usage

quaternion_to_matrix(q)

Arguments

q

A numeric vector of length 4.

Value

A 4x4 numeric matrix

Examples

quaternion_to_matrix(c(0, 0, 0, 1))
#>      [,1] [,2] [,3] [,4]
#> [1,]    1    0    0    0
#> [2,]    0    1    0    0
#> [3,]    0    0    1    0
#> [4,]    0    0    0    1