Return the angle in radians between vectors 'v1' and 'v2'.
191849
def angle(v1, v2):
    """"""
    v1_u = unit_vector(v1)
    v2_u = unit_vector(v2)
    return np.arccos(np.clip(np.dot(v1_u, v2_u), -1.0, 1.0))
55464
def direction_vector(self, other: "Point2") -> "Point2":
        
        return self.__class__((_sign(other.x - self.x), _sign(other.y - self.y)))
756335
function angle(a, b){
    var ang = (Math.atan2(b.y, b.x) - Math.atan2(a.y, a.x) + Math.PI*2) % (Math.PI*2);
    if (ang > Math.PI) ang -= Math.PI*2;
    return ang;
  }
1246465
def get_angle(self, i: int, j: int, k: int) -> float:
        
        v1 = self[i].coords - self[j].coords
        v2 = self[k].coords - self[j].coords
        return get_angle(v1, v2, units="degrees")
602784
def scalar_projection(v1, v2):
    '''
    '''
    return np.dot(v1, v2) / np.linalg.norm(v2)
1011245
function angle(v) {
         return Math.acos(me.Math.clamp(this.dotProduct(v) / (this.length() * v.length()), -1, 1));
       }
934166
def _are_aligned_angles(self, b1, b2):
        ""
        return abs(b1 - b2) <= self.angle_tol or abs(np.pi - abs(b1 - b2)) <= self.angle_tol
1289091
def fit_angle(fit1, fit2, degrees=True):
    
    return N.degrees(angle(fit1.normal,fit2.normal))
25502
def space_angle(phi1, theta1, phi2, theta2):
    
    from numpy import pi, sin, cos, arctan2, sqrt, square
    lamb1 = pi / 2 - theta1
    lamb2 = pi / 2 - theta2
    lambdelt = lamb2 - lamb1
    under = sin(phi1) * sin(phi2) + cos(phi1) * cos(phi2) * cos(lambdelt)
    over = sqrt(
        np.square((cos(phi2) * sin(lambdelt))) +
        square(cos(phi1) * sin(phi2) - sin(phi1) * cos(phi2) * cos(lambdelt))
    )
    angle = arctan2(over, under)
    return angle
316982
def get_angle_between(self, other):
        """"""
        # The scalar product is the sum of the squares of the
        # magnitude times the cosine of the angle - so normalizing the
        # vectors first means the scalar product is just the cosine of
        # the angle.
        normself = self.get_normalized()
        normother = other.get_normalized()
        sp = normself.get_scalar_product(normother)
        return math.acos(sp)
1253713
def get_radians(self):
        
        if not self: raise NullVectorError()
        return math.atan2(self.y, self.x)
241378
def dot_product(p1, p2, o=(0, 0)):
    
    v1 = vector(o, p1)
    v2 = vector(o, p2)
    return v1[0] * v2[0] + v1[1] * v2[1]
1119548
public float angle(Vector other) {
        double dot = dot(other) / (length() * other.length());

        return (float) Math.acos(dot);
    }
724921
def dot_v2(vec1, vec2):
    """"""

    return vec1.x * vec2.x + vec1.y * vec2.y
189750
def dot(v1, v2):
    '''
    '''
    x1, y1, z1 = v1
    x2, y2, z2 = v2
    return x1 * x2 + y1 * y2 + z1 * z2
1206606
def _bend_angle_low(a, b, deriv):
    """"""
    result = _bend_cos_low(a, b, deriv)
    return _cos_to_angle(result, deriv)
854306
def angle_between_vectors(x, y):
    """"""
    first_step = abs(x[0] * y[0] + x[1] * y[1] + x[2] * y[2]) / (
        np.sqrt(x[0]**2 + x[1]**2 + x[2]**2) *
        np.sqrt(y[0]**2 + y[1]**2 + y[2]**2))
    second_step = np.arccos(first_step)
    return (second_step)