List of utility methods to do cos
float | cosf(float f) Uses Math.cos, but returns the result as a float. return (float) Math.cos(f); |
float | cosf(float value) cosf return (float) Math.cos(value); |
double | cosineCoefficient(double[] hist1, double[] hist2) cosine Coefficient double distance = 0; double tmp1 = 0, tmp2 = 0; for (int i = 0; i < hist1.length; i++) { distance += hist1[i] * hist2[i]; tmp1 += hist1[i] * hist1[i]; tmp2 += hist2[i] * hist2[i]; if (tmp1 * tmp2 > 0) { ... |
float | cosineInterpolate(float y1, float y2, float mu) cosine Interpolate float mu2; mu2 = (float) (1 - Math.cos(mu * Math.PI)) / 2; return (y1 * (1 - mu2) + y2 * mu2); |
double | cosineTheorem(double d12, double d23, double theta123) For a planar triangle 1,2,3, computes d13, based on d12,d23 and theta23 = angle(d12,d23) using the cosine theorem, i.e.: d13^2 = d12^2 + d23^2 + d12 d23 cos(theta23) return (d12 * d12 + d23 * d23 - 2 * d12 * d23 * Math.cos(theta123));
|
double | cosInt(double s) cos Int return (1.0 - Math.cos(s * Math.PI)) * 0.5;
|