trinum

fun Int.trinum(): Int

Function to calculate the triangular value of a number.

Return

The triangular value of the number.

Receiver

The number to calculate the triangular value of.

Throws

if the number is negative.