toString

override fun toString(): String

Returns the string representation of this floating-point number.


Calling from Kotlin

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

val number: StrictlyNegativeDouble = StrictlyNegativeDouble.create(-23)
val result = "$number" // or number.toString()
println(result) // -23.0

Calling from Java

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

final StrictlyNegativeDouble number =
StrictlyNegativeDouble.Companion.create(-23);
final String result = number.toString();
System.out.println(result); // -23.0