package com.ama.core.common.util

import android.content.res.Resources
import android.util.TypedValue


inline val Int.dp: Int
    get() = toFloat().toDp()

inline val Double.dp: Int
    get() = toFloat().toDp()

inline val Float.dp: Int
    get() = toDp()

fun Float.toDp() = TypedValue.applyDimension(
    TypedValue.COMPLEX_UNIT_DIP, this, Resources.getSystem().displayMetrics
).toInt()