| 209 | } |
| 210 | |
| 211 | void fx_Math_clz32(txMachine* the) |
| 212 | { |
| 213 | txUnsigned x = (mxArgc > 0) ? fxToUnsigned(the, mxArgv(0)) : 0; |
| 214 | txInteger r; |
| 215 | if (x) |
| 216 | #if mxWindows |
| 217 | { |
| 218 | _BitScanReverse(&r, x); |
| 219 | r = 31 - r; |
| 220 | } |
| 221 | #else |
| 222 | r = __builtin_clz(x); |
| 223 | #endif |
| 224 | else |
| 225 | r = 32; |
| 226 | mxResult->kind = XS_INTEGER_KIND; |
| 227 | mxResult->value.integer = r; |
| 228 | } |
| 229 | |
| 230 | void fx_Math_cos(txMachine* the) |
| 231 | { |
nothing calls this directly
no test coverage detected