Here you can find the source of cosineInterpolate(float y1, float y2, float mu)
public static float cosineInterpolate(float y1, float y2, float mu)
//package com.java2s; //License from project: Open Source License public class Main { public static float cosineInterpolate(float y1, float y2, float mu) { float mu2; mu2 = (float) (1 - Math.cos(mu * Math.PI)) / 2; return (y1 * (1 - mu2) + y2 * mu2); }//from www . j a v a 2 s. c o m }