This is a rebase and continuation of PR #28. The primary benefit is that
floats finally check for overflow before casting to integers, avoiding
undefined behavior. Fixes #12.
The inter-integer conversions and all of the macros for these have also been
tweaked, hopefully improving readability. Exhaustive tests have been added for
good and bad conversions around the target MIN and MAX values.
This is a rebase and continuation of PR #28. The primary benefit is that floats finally check for overflow before casting to integers, avoiding undefined behavior. Fixes #12.
The inter-integer conversions and all of the macros for these have also been tweaked, hopefully improving readability. Exhaustive tests have been added for good and bad conversions around the target MIN and MAX values.