Given the sine and cosine of an angle, what is the original angle?

@param {number} sin
@param {number} cos
@returns {number}
171703
function(sin, cos) {

      var s = this['SCALE'];
      var angle = (1 + Math.acos(cos) / TAU) * s;

      if (sin < 0) {
        angle = s - angle;
      }
      return mod(angle, s);
    }
103634
function rotatePoint(point, degrees) {
    // TODO use existing function
    var angle = Math.PI / 180 * degrees;
    point.x = point.x * Math.cos(angle) - point.y * Math.sin(angle);
    point.y = point.x * Math.sin(angle) + point.y * Math.cos(angle);
    return point;
}
1002255
function(theta, rho) {
        this.x = Math.cos(theta) * rho;
        this.y = Math.sin(theta) * rho;
    }
546235
function (source, target, startAngle) {
                    // Given a point we need to find the next point clockwise from the start angle
                    var i,
                        point = target[target.length - 1],
                        thisAngle,
                        bestAngleSoFar = 9999,
                        returnPoint = point;
                    for (i = 0; i < source.length; i += 1) {
                        if (source[i].x !== point.x || source[i].y !== point.y) {
                            // get the angle in degrees since start angle
                            thisAngle = 180 - (Math.atan2(source[i].x - point.x, source[i].y - point.y) * (180 / Math.PI));
                            if (thisAngle > startAngle && thisAngle < bestAngleSoFar) {
                                returnPoint = source[i];
                                bestAngleSoFar = thisAngle;
                            }
                        }
                    }
                    target.push(returnPoint);
                    return bestAngleSoFar;
                }
466403
void sin(ECoordinate angle) {
		double sinv = Math.sin(angle.m_value);
		double cosv = Math.cos(angle.m_value);
		m_value = sinv;
		double absv = Math.abs(sinv);
		m_eps = (Math.abs(cosv) + absv * 0.5 * angle.m_eps) * angle.m_eps
				+ epsCoordinate() * absv;
	}
591573
def angle(self, vector):
        """"""
        return math.degrees(
            math.acos(
                self.dot(vector) /
                (self.magnitude() * vector.magnitude())
            )
        )
62567
public float angle(Vector4fc v) {
        float cos = angleCos(v);
        // This is because sometimes cos goes above 1 or below -1 because of lost precision
        cos = cos < 1 ? cos : 1;
        cos = cos > -1 ? cos : -1;
        return (float) Math.acos(cos);
    }
986855
function(deg, ox, oy, cos, sin) {
        var x2, y2;
        x2 =
            (this._x + this._origin.x - ox) * cos +
            (this._y + this._origin.y - oy) * sin +
            (ox - this._origin.x);
        y2 =
            (this._y + this._origin.y - oy) * cos -
            (this._x + this._origin.x - ox) * sin +
            (oy - this._origin.y);
        this._setter2d("_rotation", this._rotation - deg);
        this._setter2d("_x", x2);
        this._setter2d("_y", y2);
    }
126364
def rotate_Y(angle)
      sinA = if angle.respond_to? :sin
        angle.sine
      else
        Math.sin(angle*Math::PI/180)
      end
      cosA = if angle.respond_to? :cos
        angle.cos
      else
        Math.cos(angle*Math::PI/180)
      end
      mat = Matrix[[cosA, 0, -1*sinA],[0, 1, 0], [sinA, 0, cosA]]
      rotate(mat)             
    end
1243474
def _cosine(a, b):
    
    return 1. * len(a & b) / (math.sqrt(len(a)) * math.sqrt(len(b)))
909339
function(theta) {
			var co = Math.cos(theta);
			var si = Math.sin(theta);
			var xx = co * this.x - si * this.y;
			this.y = si * this.x + co * this.y;
			this.x = xx;
			return this;
		}
677451
function ( angle ) {
            var rad = this.DEG_TO_RAD * angle,
                cosVal = Math.cos( rad ),
                sinVal = Math.sin( rad ),
                mtx3d = new $B.geom.Matrix3D( 1, 0, 0, 0, 0, cosVal, -sinVal, 0, 0, sinVal, cosVal, 0 );
            return this.concat( mtx3d );
        }
671156
def cos_sin_deg(deg):
    
    deg = deg % 360.0
    if deg == 90.0:
        return 0.0, 1.0
    elif deg == 180.0:
        return -1.0, 0
    elif deg == 270.0:
        return 0, -1.0
    rad = math.radians(deg)
    return math.cos(rad), math.sin(rad)
1092290
function (radians) {
            var angle = radians % this.TWO_PI;

            return angle > Math.PI ? angle - this.TWO_PI : angle < -Math.PI ? this.TWO_PI + angle : angle;
        }
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);
  }
}
639313
function rotateX(out, a, b, c){
    var by = b[1]
    var bz = b[2]

    // Translate point to the origin
    var py = a[1] - by
    var pz = a[2] - bz

    var sc = Math.sin(c)
    var cc = Math.cos(c)

    // perform rotation and translate to correct position
    out[0] = a[0]
    out[1] = by + py * cc - pz * sc
    out[2] = bz + py * sc + pz * cc

    return out
}
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))