tan

Computes the tangent of the angle x given in radians.

expect fun tan(x: Double): Double(source)
import kotlin.math.tan
import kotlin.math.PI

fun main() {
    // Angle of 45 degrees in radians
    val angleDegrees = 45.0
    val angleRadians = Math.toRadians(angleDegrees)

    // Compute the tangent
    val tanValue = tan(angleRadians)

    println("tan($angleDegrees°) = $tanValue")
}

Source