List of utility methods to do cos to sin
double | cosToSin(double angle, double cos) Fast way of computing sin(x) from x and cos(x). if ((-1e-5 < cos && cos < 1e-5) || cos > 0.99999 || cos < -0.99999) { return Math.sin(angle); angle = normAngle(angle); final double s = Math.sqrt(1 - cos * cos); return (angle < Math.PI) ? s : -s; |