| 5622 | } |
| 5623 | |
| 5624 | public Object parseToNumeric(Object number) |
| 5625 | { |
| 5626 | Object stringVersion = this.numberToString(number); // this will convert 1.0 and 1 to "1" and 1.1 to "1.1" |
| 5627 | // keep this in mind: |
| 5628 | // in JS: 1 === 1.0 is true |
| 5629 | // in Python: 1 == 1.0 is true |
| 5630 | // in PHP: 1 == 1.0 is true, but 1 === 1.0 is false. |
| 5631 | if (Helpers.isTrue(Helpers.isGreaterThanOrEqual(Helpers.getIndexOf(stringVersion, "."), 0))) |
| 5632 | { |
| 5633 | return Helpers.parseFloat(stringVersion); |
| 5634 | } |
| 5635 | return Helpers.parseInt(stringVersion); |
| 5636 | } |
| 5637 | |
| 5638 | public Object isRoundNumber(Object value) |
| 5639 | { |