algebra_3D.Vector.angle_vec

Vector.angle_vec()

Get the angle between two vectors. The operation is realized if and only if the two vectors have the same origin.

Parameters

Type

Description

vec

Vector

The vector angle-oriented with self vector

mode

int

The angle unit :
  • 0 => radians

  • 1 => degrees

Returns
double

The angle between the two vectors.

See also

Vector.cos

Examples

>>> u=Vector(0,0,0,1,0,0)
>>> v=Vector(0,0,0,0,1,0)
>>> u.angle_vec(v)
90.00003218077504
>>> u.angle_vec(v,0)
1.5707963267948966