toString
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
Content copied to clipboard
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
Content copied to clipboard