<commit_before>package jp.toastkid.yobidashi.browser.webview

import android.content.Context
import android.graphics.Color
import androidx.annotation.ColorInt
import androidx.core.graphics.ColorUtils
import jp.toastkid.yobidashi.libs.preference.PreferenceApplier

/**
 * @author toastkidjp
 */
class AlphaConverter {

    @ColorInt
    fun readBackground(context: Context) =
            ColorUtils.setAlphaComponent(
                    Color.WHITE,
                    Math.round((255f * PreferenceApplier(context).getWebViewBackgroundAlpha()))
            )
}
<commit_msg>refactor #559 Replace with `roundToInt` function.<commit_after>package jp.toastkid.yobidashi.browser.webview

import android.content.Context
import android.graphics.Color
import androidx.annotation.ColorInt
import androidx.core.graphics.ColorUtils
import jp.toastkid.yobidashi.libs.preference.PreferenceApplier
import kotlin.math.roundToInt

/**
 * @author toastkidjp
 */
class AlphaConverter {

    @ColorInt
    fun readBackground(context: Context) =
            ColorUtils.setAlphaComponent(
                    Color.WHITE,
                    (255f * PreferenceApplier(context).getWebViewBackgroundAlpha()).roundToInt()
            )
}

{'fraction_non_alphanumeric': 0.08888888888888889, 'fraction_numerical': 0.007407407407407408, 'mean_word_length': 3.3898916967509027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5014014', 'n_tokens_mistral': 367, 'n_tokens_neox': 343, 'n_words': 55}