json-logic-php icon indicating copy to clipboard operation
json-logic-php copied to clipboard

Change "%" op from integer to floating point

Open CoeusCC opened this issue 4 years ago • 0 comments

Details are in issue #8.

If accepted, users who are expecting {"%": [10.5, 2]} to result in 1 instead of 0.5 will be unhappy. Hence some might consider this a breaking change instead of a bugfix. JavaScript users are already receiving float modulo values, so this would align JS and PHP in terms of features.

An alternative would be to make two new ops for intmod and floatmod for explicit behaviors.

CoeusCC avatar May 07 '20 13:05 CoeusCC