angle_vectors function

Angle Between Two Vectors

Angle Between Two Vectors

Calculates the angle between two vectors

angle_vectors(x, y)

Arguments

  • x, y: Vectors in Cartesian coordinates. Can be vectors of three numbers or a matrix of 3 columns (x, y, z)

Returns

numeric. angle in degrees

Examples

u <- c(1, -2, 3) v <- c(-2, 1, 1) angle_vectors(u, v)
  • Maintainer: Tobias Stephan
  • License: GPL (>= 3)
  • Last published: 2025-03-01