Calculates angle between three coordinate points (I could not find a package
    that does this but if one exists that would probably be better). Used for Angle constraints.
198094
def angle(array_of_xyzs):
    
    ab = array_of_xyzs[0] - array_of_xyzs[1]
    cb = array_of_xyzs[2] - array_of_xyzs[1]
    return np.arccos((np.dot(ab,cb)) / (np.sqrt(ab[0]**2 + ab[1]**2  \
        + ab[2]**2) * np.sqrt(cb[0]**2 + cb[1]**2 + cb[2]**2)))
1282455
function angleToPoint(v) {
         var a = this.getBounds(); // the me.Vector2d object also implements the same function, but
         // we have to use here the center of both entities

         var ax = v.x - (a.pos.x + a.width / 2);
         var ay = v.y - (a.pos.y + a.height / 2);
         return Math.atan2(ay, ax);
       }
431154
def Angle(self, other):
    
    return math.atan2(self.CrossProd(other).Norm2(),
                      self.DotProd(other))
731141
public static double angleBetween3D( Coordinate c1, Coordinate c2, Coordinate c3 ) {
        double a = distance3d(c2, c1, null);
        double b = distance3d(c2, c3, null);
        double c = distance3d(c1, c3, null);

        double angleInTriangle = getAngleInTriangle(a, b, c);
        double degrees = toDegrees(angleInTriangle);
        return degrees;
    }
1058327
def get_rotated(self, angle):
        """"""
        ca = math.cos(angle)
        sa = math.sin(angle)
        return Point(self.x*ca-self.y*sa, self.x*sa+self.y*ca)
59725
function (angle) {
            if (angle !== 0) {
                var a = this.val,
                    a00 = a[0],
                    a01 = a[1],
                    a02 = a[2],
                    a10 = a[3],
                    a11 = a[4],
                    a12 = a[5],
                    s = Math.sin(angle),
                    c = Math.cos(angle);

                a[0] = c * a00 + s * a10;
                a[1] = c * a01 + s * a11;
                a[2] = c * a02 + s * a12;

                a[3] = c * a10 - s * a00;
                a[4] = c * a11 - s * a01;
                a[5] = c * a12 - s * a02;
            }
            return this;
        }
262887
public float angleCos(Vector4fc v) {
        double length1Squared = x * x + y * y + z * z + w * w;
        double length2Squared = v.x() * v.x() + v.y() * v.y() + v.z() * v.z() + v.w() * v.w();
        double dot = x * v.x() + y * v.y() + z * v.z() + w * v.w();
        return (float) (dot / (Math.sqrt(length1Squared * length2Squared)));
    }
281373
def rodrigues_axis_angle_rotate(x, vec, theta):
    
    x = np.array(x).T
    vec = np.array(vec).T
    theta = np.array(theta).T[...,None]

    out = np.cos(theta)*x + np.sin(theta)*np.cross(vec, x) + \
        (1 - np.cos(theta)) * (vec * x).sum(axis=-1)[...,None] * vec

    return out.T
1344453
function angle(a, b) {
  var x1 = a[0],
      y1 = a[1],
      x2 = b[0],
      y2 = b[1];

  var len1 = x1 * x1 + y1 * y1;
  if (len1 > 0) {
    //TODO: evaluate use of glm_invsqrt here?
    len1 = 1 / Math.sqrt(len1);
  }

  var len2 = x2 * x2 + y2 * y2;
  if (len2 > 0) {
    //TODO: evaluate use of glm_invsqrt here?
    len2 = 1 / Math.sqrt(len2);
  }

  var cosine = (x1 * x2 + y1 * y2) * len1 * len2;

  if (cosine > 1.0) {
    return 0;
  } else if (cosine < -1.0) {
    return Math.PI;
  } else {
    return Math.acos(cosine);
  }
}
1011245
function angle(v) {
         return Math.acos(me.Math.clamp(this.dotProduct(v) / (this.length() * v.length()), -1, 1));
       }
1045348
function(point, angle) {
    var x = point[0];
    var y = point[1];
    var si_z = Math.sin(angle);
    var co_z = Math.cos(angle);
    var newX = x * co_z - y * si_z;
    var newY = x * si_z + y * co_z;
    return [newX, newY];
  }
1358538
def angle(u, v, w=None):
    
    if w is not None:
        u = u - v
        v = w - v
    c = np.dot(u, v) / norm(u) / norm(v)
    return np.arccos(np.clip(c, -1, 1))
922450
def barycentric_coordinate( check_point )
      Util3D.check_arg_type(::Vector3, check_point)

      v0 = @vertices[0]
      v1 = @vertices[1]
      v2 = @vertices[2]

      d1 = v1 - v0
      d2 = v2 - v1
      n = d1.cross(d2);
      if((n.x).abs >= (n.y).abs && (n.x).abs >= (n.z).abs)
        uu1 = v0.y - v2.y;
        uu2 = v1.y - v2.y;
        uu3 = check_point.y  - v0.y;
        uu4 = check_point.y  - v2.y;
        vv1 = v0.z - v2.z;
        vv2 = v1.z - v2.z;
        vv3 = check_point.z  - v0.z;
        vv4 = check_point.z  - v2.z;
      elsif((n.y).abs >= (n.z).abs)
        uu1 = v0.z - v2.z;
        uu2 = v1.z - v2.z;
        uu3 = check_point.z  - v0.z;
        uu4 = check_point.z  - v2.z;
        vv1 = v0.x - v2.x;
        vv2 = v1.x - v2.x;
        vv3 = check_point.x  - v0.x;
        vv4 = check_point.x  - v2.x;
      else
        uu1 = v0.x - v2.x;
        uu2 = v1.x - v2.x;
        uu3 = check_point.x  - v0.x;
        uu4 = check_point.x  - v2.x;
        vv1 = v0.y - v2.y;
        vv2 = v1.y - v2.y;
        vv3 = check_point.y  - v0.y;
        vv4 = check_point.y  - v2.y;
      end

      denom = vv1 * uu2 - vv2* uu1
      if(denom == 0.0)
	return nil
      end
      b = Array.new(3)
      oneOverDenom = 1.0 / denom ;
      b[0] = (vv4*uu2 - vv2*uu4) * oneOverDenom;
      b[1] = (vv1*uu3 - vv3*uu1) * oneOverDenom;
      b[2] = 1.0 - b[0] - b[1];
      return b;
    end
45133
def new_get_angle_diff(v1,v2):
    """"""
    v1 = numpy.array(v1)
    v2 = numpy.array(v2)
    angle = numpy.arctan2(numpy.linalg.norm(numpy.cross(v1, v2)), numpy.dot(v1, v2))
    return math.degrees(angle)
733321
public static float calcDet(Vector3 a ,Vector3 b, Vector3 c) {
		return (a.x*(b.y-c.y)) - (a.y*(b.x-c.x)) + (b.x*c.y-b.y*c.x);
	}
22660
def vector_angle_cos(u, v):
    '''
    
    '''
    u = np.asarray(u)
    v = np.asarray(v)
    return (u * v).sum(0) / np.sqrt((u ** 2).sum(0) * (v ** 2).sum(0))
301566
def _opbend_angle_low(a, b, c, deriv=0):
    """"""
    result = _opbend_cos_low(a, b, c, deriv)
    sign = np.sign(np.linalg.det([a, b, c]))
    return _cos_to_angle(result, deriv, sign)