Hi
On 6/13/24 03:28, Gina P. Banyard wrote:
Thank you, I think other than possibly prefixing the NegativeInfinity
and PositiveInfinity cases with "Towards" I am happy with the content
of the RFC.
I've discussed this with Saki. In that case the `HalfEven` and `HalfOdd`
modes would also need to be renamed to `HalfTowardsEven` and
`HalfTowardsOdd`, resulting in this:
enum RoundingMode
{
case HalfAwayFromZero; // PHP_ROUND_HALF_UP
case HalfTowardsZero; // PHP_ROUND_HALF_DOWN
case HalfTowardsEven; // PHP_ROUND_HALF_EVEN
case HalfTowardsOdd; // PHP_ROUND_HALF_ODD
case TowardsZero; // PHP_ROUND_TOWARD_ZERO
case AwayFromZero; // PHP_ROUND_AWAY_FROM_ZERO
case TowardsNegativeInfinity; // PHP_ROUND_FLOOR
case TowardsPositiveInfinity; // PHP_ROUND_CEILING
}
Except for the `AwayFromZero` modes, every mode contains `Towards` and
especially the `HalfTowardsX` modes are too similar to easily
distinguish them visually.
Thus we prefer the current state of the RFC where the different modes
have plenty of hamming distance, while still being sufficiently descriptive.
Best regards
Tim Düsterhus