package y2;

import android.text.TextPaint;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.perf.util.Constants;

/* loaded from: classes.dex */
public abstract class h {
    public static final void a(TextPaint textPaint, float f10) {
        if (Float.isNaN(f10)) {
            return;
        }
        if (f10 < BitmapDescriptorFactory.HUE_RED) {
            f10 = 0.0f;
        }
        if (f10 > 1.0f) {
            f10 = 1.0f;
        }
        textPaint.setAlpha(Math.round(f10 * Constants.MAX_HOST_LENGTH));
    }
}
