dfinity / motoko-base

The Motoko base library
Apache License 2.0
483 stars 99 forks source link

Clarify Float.toInt is truncating #647

Open timohanke opened 4 months ago

timohanke commented 4 months ago

https://github.com/dfinity/motoko-base/blob/2dca37c48e6c8f3225eb78f6d32486819a89eb88/src/Float.mo#L467-L476

This doc string should describe the exact behaviour like the doc string for toInt64 does. I believe the behaviour is the same (truncating). Maybe copy the doc string from toInt64 including the example with a negative number.