Affine transformation of vector by matrix
Usage
vtransform(x, A, norm = FALSE)
Arguments
- x
numeric vector, array, or object of class "line"
or "plane"
- A
3x3 matrix
- norm
logical. Whether the transformed vector should be normalized
(TRUE
) or not (FALSE
, the default).
Examples
mat <- cbind(V1 = c(1, 0, 0), V2 = c(0, 1, 0), V3 = c(0, 0, -1))
vec <- c(1, 1, 1)
vtransform(vec, mat)
#> x y z
#> [1,] 1 1 -1