    001package net.minecraft.util;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005
    006@SideOnly(Side.CLIENT)
    007public class MouseFilter
    008{
    009    private float field_76336_a;
    010    private float field_76334_b;
    011    private float field_76335_c;
    012
    013    /**
    014     * Smooths mouse input
    015     */
    016    public float smooth(float par1, float par2)
    017    {
    018        this.field_76336_a += par1;
    019        par1 = (this.field_76336_a - this.field_76334_b) * par2;
    020        this.field_76335_c += (par1 - this.field_76335_c) * 0.5F;
    021
    022        if (par1 > 0.0F && par1 > this.field_76335_c || par1 < 0.0F && par1 < this.field_76335_c)
    023        {
    024            par1 = this.field_76335_c;
    025        }
    026
    027        this.field_76334_b += par1;
    028        return par1;
    029    }
    030}