toFloat

@ExperimentalSince(version = KotoolsTypesVersion.V4_5_2)
fun toFloat(): Float

Returns this number as Float.


Calling from Kotlin

Here's an example of calling this function from Kotlin code:

val actual: Float = Zero()
.toFloat()
val expected = 0f
assertEquals(expected, actual)

Calling from Java

Here's an example of calling this function from Java code:

final float actual = new Zero()
.toFloat();
final float expected = 0;
Assertions.assertEquals(expected, actual);