Direction cosines
cosines.RdGiven a vector of three-velocities, returns their direction cosines
Examples
cosines(r3vel(7))
#> x y z
#> [1,] -0.7847426 0.5918643 -0.1840536
#> [2,] 0.5915187 0.7493984 -0.2975024
#> [3,] 0.0838383 -0.8753404 0.4761831
#> [4,] 0.9443351 0.0165019 0.3285710
#> [5,] -0.5146649 -0.2167161 -0.8295506
#> [6,] 0.6010511 0.3625150 0.7122643
#> [7,] -0.1557215 0.5098808 -0.8460334
cosines(r3vel(1),drop=TRUE)
#> x y z
#> -0.002123437 0.972412407 -0.233258659
cosines(r3vel(1),drop=FALSE)
#> x y z
#> [1,] 0.4366976 0.09444935 0.8946365