| 656 | } |
| 657 | |
| 658 | void fx_Math_sign(txMachine* the) |
| 659 | { |
| 660 | txNumber arg; |
| 661 | mxNanResultIfNoArg; |
| 662 | arg = fxToNumber(the, mxArgv(0)); |
| 663 | mxResult->kind = XS_NUMBER_KIND; |
| 664 | if (c_isnan(arg)) |
| 665 | mxResult->value.number = C_NAN; |
| 666 | else if (arg < 0) |
| 667 | mxResult->value.number = -1; |
| 668 | else if (arg > 0) |
| 669 | mxResult->value.number = 1; |
| 670 | else |
| 671 | mxResult->value.number = arg; |
| 672 | fx_Math_toInteger(the); |
| 673 | } |
| 674 | |
| 675 | void fx_Math_sin(txMachine* the) |
| 676 | { |
nothing calls this directly
no test coverage detected