TODO All AR_* functions need to emit appropriate failures when provided * with arguments of invalid types and handle multiple arguments. */ returns the absolute value of the given number. */
| 63 | * with arguments of invalid types and handle multiple arguments. */ |
| 64 | /* returns the absolute value of the given number. */ |
| 65 | SIValue AR_ABS(SIValue *argv, int argc, void *private_data) { |
| 66 | SIValue result = argv[0]; |
| 67 | if(SIValue_IsNull(result)) return SI_NullVal(); |
| 68 | if(SI_GET_NUMERIC(argv[0]) < 0) return SIValue_Multiply(argv[0], SI_LongVal(-1)); |
| 69 | return argv[0]; |
| 70 | } |
| 71 | |
| 72 | /* returns the smallest floating point number that is greater than or equal to the given number and equal to a mathematical integer. */ |
| 73 | SIValue AR_CEIL(SIValue *argv, int argc, void *private_data) { |
nothing calls this directly
no test coverage detected