I was recently learning about Kotlin inline functions. I thought the below function, twipsToPixels, seemed like a good use-case for that, but IntelliJ gives me a warning saying there's an "expected performance impact". I would've thought the opposite would be true here? This makes me think I'm missing something deeper. Does anyone have any thoughts?
private inline fun twipsToPixels(value: Int) = (value * SCREEN_RESOLUTION / TWIPS_CONVERSION).roundToInt()
private fun screenBoxInPixels(screenBox: ScreenBox): ScreenBox {
val left = twipsToPixels(screenBox.position.left)
val top = twipsToPixels(screenBox.position.top)
val width = twipsToPixels(screenBox.size.width)
val height = twipsToPixels(screenBox.size.height)
return ScreenBox(Position(left, top), Size(width, height))
}