This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package xyz.wbsite.jmacro.util;
public class AnimateUtil {
/**
* 由快到慢
*
* @param time 时间(0~1)
* @return 值(0~1)
*/
public static double easeOut(double time) {
if (time <= 0) {
return 0D;
}
if (time >= 1) {
return 1D;
return Math.sin(time * Math.PI / 2);
* 由慢到快
public static double easeIn(double time) {
return 1 - Math.cos(time * Math.PI / 2);
Powered by TurnKey Linux.